/*
Copyright (c) 2014-2025 AscEmu Team <http://www.ascemu.org>
This file is released under the MIT license. See README-MIT for more information.
*/

#pragma once

#include "AEVersion.hpp"

#if VERSION_STRING <= TBC
enum MovementFlags
{
    // Byte 1 (Resets on Movement Key Press)
    MOVEFLAG_MOVE_STOP                  = 0x00000000,
    MOVEFLAG_MOVE_FORWARD               = 0x00000001,
    MOVEFLAG_MOVE_BACKWARD              = 0x00000002,
    MOVEFLAG_STRAFE_LEFT                = 0x00000004,
    MOVEFLAG_STRAFE_RIGHT               = 0x00000008,
    MOVEFLAG_TURN_LEFT                  = 0x00000010,
    MOVEFLAG_TURN_RIGHT                 = 0x00000020,
    MOVEFLAG_PITCH_UP                   = 0x00000040,
    MOVEFLAG_PITCH_DOWN                 = 0x00000080,

    // Byte 2 (Resets on Situation Change)
    MOVEFLAG_WALK                       = 0x00000100,
    MOVEFLAG_TRANSPORT                  = 0x00000200,
    MOVEFLAG_DISABLEGRAVITY             = 0x00000400,
    MOVEFLAG_ROOTED                     = 0x00000800,
    MOVEFLAG_FALLING                    = 0x00001000,
    MOVEFLAG_FALLING_FAR                = 0x00002000,
    MOVEFLAG_PENDING_STOP               = 0x00004000,
    MOVEFLAG_PENDING_UNSTRAFE           = 0x00008000,

    // Byte 3 
    MOVEFLAG_PENDING_FORWARD            = 0x00010000,
    MOVEFLAG_PENDING_BACKWARD           = 0x00020000,
    MOVEFLAG_PENDING_STRAFE_LEFT        = 0x00040000,
    MOVEFLAG_PENDING_STRAFE_RIGHT       = 0x00080000,
    MOVEFLAG_PENDING_ROOT               = 0x00100000,
    MOVEFLAG_SWIMMING                   = 0x00200000,
    MOVEFLAG_ASCENDING                  = 0x00400000,
    MOVEFLAG_CAN_FLY                    = 0x00800000,

    // Byte 4 (Script Based Flags. Never reset, only turned on or off.)
    MOVEFLAG_FLYING                     = 0x01000000,
    MOVEFLAG_FLYING2                    = 0x02000000,
    MOVEFLAG_SPLINE_ELEVATION           = 0x04000000,
    MOVEFLAG_SPLINE_ENABLED             = 0x08000000,
    MOVEFLAG_WATER_WALK                 = 0x10000000,
    MOVEFLAG_FEATHER_FALL               = 0x20000000,
    MOVEFLAG_HOVER                      = 0x40000000,

    // Masks
    MOVEFLAG_MOVING_MASK =
    MOVEFLAG_MOVE_FORWARD | MOVEFLAG_MOVE_BACKWARD | MOVEFLAG_STRAFE_LEFT | MOVEFLAG_STRAFE_RIGHT |
    MOVEFLAG_FALLING | MOVEFLAG_FALLING_FAR | MOVEFLAG_ASCENDING | MOVEFLAG_SPLINE_ELEVATION,

    MOVEFLAG_SPLINE_FORWARD_ENABLED     = MOVEFLAG_MOVE_FORWARD | MOVEFLAG_SPLINE_ENABLED,
    MOVEFLAG_STRAFING_MASK              = 0x0C,
    MOVEFLAG_TURNING_MASK               = 0x30,         // MOVEFLAG_TURN_LEFT + MOVEFLAG_TURN_RIGHT
    MOVEFLAG_FALLING_MASK               = 0x6000,
    MOVEFLAG_FLYING_MASK                = MOVEFLAG_FLYING | MOVEFLAG_DISABLEGRAVITY,
    MOVEFLAG_MOTION_MASK                = 0xE00F,       // Forwards, Backwards, Strafing, Falling
    MOVEFLAG_PENDING_MASK               = 0x7F0000,
    MOVEFLAG_PENDING_STRAFE_MASK        = 0x600000,
    MOVEFLAG_PENDING_MOVE_MASK          = 0x180000,
    MOVEFLAG_FULL_FALLING_MASK          = 0xE000,
};

enum MovementFlags2
{
    MOVEFLAG2_NO_STRAFING               = 0x0001,
    MOVEFLAG2_NO_JUMPING                = 0x0002,
    MOVEFLAG2_UNK1                      = 0x0004,
    MOVEFLAG2_FULLSPEED_TURNING         = 0x0008,
    MOVEFLAG2_FULLSPEED_PITCHING        = 0x0010,
    MOVEFLAG2_ALLOW_PITCHING            = 0x0020,
    MOVEFLAG2_UNK2                      = 0x0040,
    MOVEFLAG2_UNK3                      = 0x0080,
    MOVEFLAG2_UNK4                      = 0x0100,
    MOVEFLAG2_UNK5                      = 0x0200,
    MOVEFLAG2_INTERPOLATED_MOVE         = 0x0400,
    MOVEFLAG2_INTERPOLATED_TURN         = 0x0800,
    MOVEFLAG2_INTERPOLATED_PITCH        = 0x1000
};
#endif

#if VERSION_STRING == WotLK
enum MovementFlags
{
    // Byte 1 (Resets on Movement Key Press)
    MOVEFLAG_MOVE_STOP                  = 0x00000000,
    MOVEFLAG_MOVE_FORWARD               = 0x00000001,
    MOVEFLAG_MOVE_BACKWARD              = 0x00000002,
    MOVEFLAG_STRAFE_LEFT                = 0x00000004,
    MOVEFLAG_STRAFE_RIGHT               = 0x00000008,
    MOVEFLAG_TURN_LEFT                  = 0x00000010,
    MOVEFLAG_TURN_RIGHT                 = 0x00000020,
    MOVEFLAG_PITCH_UP                   = 0x00000040,
    MOVEFLAG_PITCH_DOWN                 = 0x00000080,

    // Byte 2 (Resets on Situation Change)
    MOVEFLAG_WALK                       = 0x00000100,
    MOVEFLAG_TRANSPORT                  = 0x00000200,
    MOVEFLAG_DISABLEGRAVITY             = 0x00000400,
    MOVEFLAG_ROOTED                     = 0x00000800,
    MOVEFLAG_FALLING                    = 0x00001000,
    MOVEFLAG_FALLING_FAR                = 0x00002000,
    MOVEFLAG_PENDING_STOP               = 0x00004000,
    MOVEFLAG_PENDING_UNSTRAFE           = 0x00008000,

    // Byte 3 
    MOVEFLAG_PENDING_FORWARD            = 0x00010000,
    MOVEFLAG_PENDING_BACKWARD           = 0x00020000,
    MOVEFLAG_PENDING_STRAFE_LEFT        = 0x00040000,
    MOVEFLAG_PENDING_STRAFE_RIGHT       = 0x00080000,
    MOVEFLAG_PENDING_ROOT               = 0x00100000,
    MOVEFLAG_SWIMMING                   = 0x00200000,
    MOVEFLAG_ASCENDING                  = 0x00400000,
    MOVEFLAG_DESCENDING                 = 0x00800000,

    // Byte 4 (Script Based Flags. Never reset, only turned on or off.)
    MOVEFLAG_CAN_FLY                    = 0x01000000,
    MOVEFLAG_FLYING                     = 0x02000000,
    MOVEFLAG_SPLINE_ELEVATION           = 0x04000000,
    MOVEFLAG_SPLINE_ENABLED             = 0x08000000,
    MOVEFLAG_WATER_WALK                 = 0x10000000,
    MOVEFLAG_FEATHER_FALL               = 0x20000000,
    MOVEFLAG_HOVER                      = 0x40000000,

    // Masks
    MOVEFLAG_MOVING_MASK =
    MOVEFLAG_MOVE_FORWARD | MOVEFLAG_MOVE_BACKWARD | MOVEFLAG_STRAFE_LEFT | MOVEFLAG_STRAFE_RIGHT |
    MOVEFLAG_FALLING | MOVEFLAG_FALLING_FAR | MOVEFLAG_ASCENDING | MOVEFLAG_DESCENDING | MOVEFLAG_SPLINE_ELEVATION,

    MOVEFLAG_SPLINE_FORWARD_ENABLED     = MOVEFLAG_MOVE_FORWARD | MOVEFLAG_SPLINE_ENABLED,
    MOVEFLAG_STRAFING_MASK              = 0x0C,
    MOVEFLAG_TURNING_MASK               = 0x30,         // MOVEFLAG_TURN_LEFT + MOVEFLAG_TURN_RIGHT
    MOVEFLAG_FALLING_MASK               = 0x6000,
    MOVEFLAG_FLYING_MASK                = MOVEFLAG_FLYING | MOVEFLAG_DISABLEGRAVITY,
    MOVEFLAG_MOTION_MASK                = 0xE00F,       // Forwards, Backwards, Strafing, Falling
    MOVEFLAG_PENDING_MASK               = 0x7F0000,
    MOVEFLAG_PENDING_STRAFE_MASK        = 0x600000,
    MOVEFLAG_PENDING_MOVE_MASK          = 0x180000,
    MOVEFLAG_FULL_FALLING_MASK          = 0xE000,
};

enum MovementFlags2
{
    MOVEFLAG2_NO_STRAFING               = 0x0001,
    MOVEFLAG2_NO_JUMPING                = 0x0002,
    MOVEFLAG2_UNK1                      = 0x0004,
    MOVEFLAG2_FULLSPEED_TURNING         = 0x0008,
    MOVEFLAG2_FULLSPEED_PITCHING        = 0x0010,
    MOVEFLAG2_ALLOW_PITCHING            = 0x0020,
    MOVEFLAG2_UNK2                      = 0x0040,
    MOVEFLAG2_UNK3                      = 0x0080,
    MOVEFLAG2_UNK4                      = 0x0100,
    MOVEFLAG2_UNK5                      = 0x0200,
    MOVEFLAG2_INTERPOLATED_MOVE         = 0x0400,
    MOVEFLAG2_INTERPOLATED_TURN         = 0x0800,
    MOVEFLAG2_INTERPOLATED_PITCH        = 0x1000
};
#endif

#if VERSION_STRING >= Cata

#include "Server/Opcodes.hpp"
enum MovementFlags
{
    MOVEFLAG_NONE                   = 0x00000000,
    MOVEFLAG_MOVE_FORWARD           = 0x00000001,
    MOVEFLAG_MOVE_BACKWARD          = 0x00000002,
    MOVEFLAG_STRAFE_LEFT            = 0x00000004,
    MOVEFLAG_STRAFE_RIGHT           = 0x00000008,
    MOVEFLAG_TURN_LEFT              = 0x00000010,
    MOVEFLAG_TURN_RIGHT             = 0x00000020,
    MOVEFLAG_PITCH_UP               = 0x00000040,
    MOVEFLAG_PITCH_DOWN             = 0x00000080,
    MOVEFLAG_WALK                   = 0x00000100,
    MOVEFLAG_DISABLEGRAVITY         = 0x00000200,
    MOVEFLAG_ROOTED                 = 0x00000400,
    MOVEFLAG_FALLING                = 0x00000800,
    MOVEFLAG_FALLING_FAR            = 0x00001000,
    MOVEFLAG_PENDING_STOP           = 0x00002000,
    MOVEFLAG_PENDING_STRAFE_STOP    = 0x00004000,
    MOVEFLAG_PENDING_FORWARD        = 0x00008000,
    MOVEFLAG_PENDING_BACKWARD       = 0x00010000,
    MOVEFLAG_PENDING_STRAFE_LEFT    = 0x00020000,
    MOVEFLAG_PENDING_STRAFE_RIGHT   = 0x00040000,
    MOVEFLAG_PENDING_ROOT           = 0x00080000,
    MOVEFLAG_SWIMMING               = 0x00100000,
    MOVEFLAG_ASCENDING              = 0x00200000,
    MOVEFLAG_DESCENDING             = 0x00400000,
    MOVEFLAG_CAN_FLY                = 0x00800000,
    MOVEFLAG_FLYING                 = 0x01000000,
    MOVEFLAG_SPLINE_ELEVATION       = 0x02000000,
    MOVEFLAG_WATER_WALK             = 0x04000000,
    MOVEFLAG_FEATHER_FALL           = 0x08000000,
    MOVEFLAG_HOVER                  = 0x10000000,
    MOVEFLAG_NO_COLLISION           = 0x20000000,

    // Masks
    MOVEFLAG_MOVING_MASK =
        MOVEFLAG_MOVE_FORWARD | MOVEFLAG_MOVE_BACKWARD | MOVEFLAG_STRAFE_LEFT | MOVEFLAG_STRAFE_RIGHT |
        MOVEFLAG_PITCH_UP | MOVEFLAG_PITCH_DOWN | MOVEFLAG_FALLING | MOVEFLAG_FALLING_FAR | 
        MOVEFLAG_ASCENDING | MOVEFLAG_DESCENDING | MOVEFLAG_SPLINE_ELEVATION,

    MOVEFLAG_TURNING_MASK =
        MOVEFLAG_TURN_LEFT | MOVEFLAG_TURN_RIGHT,

    MOVEFLAG_FLYING_MASK            = MOVEFLAG_FLYING | MOVEFLAG_DISABLEGRAVITY,
    MOVEFLAG_FALLING_MASK           = 0x6000,
    MOVEFLAG_MOTION_MASK            = 0xE00F,
    MOVEFLAG_PENDING_MASK           = 0x7F0000,
    MOVEFLAG_PENDING_STRAFE_MASK    = 0x600000,
    MOVEFLAG_PENDING_MOVE_MASK      = 0x180000,
    MOVEFLAG_FULL_FALLING_MASK      = 0xE000
};

enum MovementFlags2 : uint16_t
{
    MOVEFLAG2_NONE                  = 0x0000,
    MOVEFLAG2_NO_STRAFING           = 0x0001,
    MOVEFLAG2_NO_JUMPING            = 0x0002,
    MOVEFLAG2_FULLSPEED_TURNING     = 0x0004,
    MOVEFLAG2_FULLSPEED_PITCHING    = 0x0008,
    MOVEFLAG2_ALLOW_PITCHING        = 0x0010,
    MOVEFLAG2_UNK4                  = 0x0020,
    MOVEFLAG2_UNK5                  = 0x0040,
    MOVEFLAG2_UNK6                  = 0x0080,
    MOVEFLAG2_UNK7                  = 0x0100,
    MOVEFLAG2_INTERPOLATED_MOVE     = 0x0200,
    MOVEFLAG2_INTERPOLATED_TURN     = 0x0400,
    MOVEFLAG2_INTERPOLATED_PITCH    = 0x0800,
    MOVEFLAG2_INTERPOLATED_MASK =
        MOVEFLAG2_INTERPOLATED_MOVE | MOVEFLAG2_INTERPOLATED_TURN | MOVEFLAG2_INTERPOLATED_PITCH
};


class ByteBuffer;
class Unit;

enum MovementStatusElements
{
    MSEFlags,
    MSEFlags2,
    MSETimestamp,
    MSEHasPitch,
    MSEGuidBit0,
    MSEGuidBit1,
    MSEGuidBit2,
    MSEGuidBit3,
    MSEGuidBit4,
    MSEGuidBit5,
    MSEGuidBit6,
    MSEGuidBit7,
    MSEGuid2Bit0,
    MSEGuid2Bit1,
    MSEGuid2Bit2,
    MSEGuid2Bit3,
    MSEGuid2Bit4,
    MSEGuid2Bit5,
    MSEGuid2Bit6,
    MSEGuid2Bit7,
    MSEHasUnknownBit,
    MSEHasMovementFlags,
    MSEHasMovementFlags2,
    MSEHasTimestamp,
    MSEHasOrientation,
    MSEHasFallData,
    MSEHasFallDirection,
    MSEHasTransportData,
    MSEHasTransportTime2,
    MSEHasTransportTime3,
    MSETransportGuidBit0,
    MSETransportGuidBit1,
    MSETransportGuidBit2,
    MSETransportGuidBit3,
    MSETransportGuidBit4,
    MSETransportGuidBit5,
    MSETransportGuidBit6,
    MSETransportGuidBit7,
    MSEHasSpline,
    MSEHasSplineElevation,
    MSEPositionX,
    MSEPositionY,
    MSEPositionZ,
    MSEPositionO,
    MSEGuidByte0,
    MSEGuidByte1,
    MSEGuidByte2,
    MSEGuidByte3,
    MSEGuidByte4,
    MSEGuidByte5,
    MSEGuidByte6,
    MSEGuidByte7,
    MSEGuid2Byte0,
    MSEGuid2Byte1,
    MSEGuid2Byte2,
    MSEGuid2Byte3,
    MSEGuid2Byte4,
    MSEGuid2Byte5,
    MSEGuid2Byte6,
    MSEGuid2Byte7,
    MSEPitch,
    MSEFallTime,
    MSETransportGuidByte0,
    MSETransportGuidByte1,
    MSETransportGuidByte2,
    MSETransportGuidByte3,
    MSETransportGuidByte4,
    MSETransportGuidByte5,
    MSETransportGuidByte6,
    MSETransportGuidByte7,
    MSESplineElevation,
    MSEFallHorizontalSpeed,
    MSEFallVerticalSpeed,
    MSEFallCosAngle,
    MSEFallSinAngle,
    MSETransportSeat,
    MSETransportPositionO,
    MSETransportPositionX,
    MSETransportPositionY,
    MSETransportPositionZ,
    MSETransportTime,
    MSETransportTime2,
    MSETransportTime3,
    MSEMovementCounter,
    MSEByteParam,
    MSECustomSpeed,
    MSEEnd,
    MSE_COUNT,

    MSEExtraFloat,
    MSEExtraInt8
};

static MovementStatusElements PlayerMoveSequence[] =
{
    MSEHasFallData,
    MSEGuidBit3,
    MSEGuidBit6,
    MSEHasMovementFlags2,
    MSEHasSpline,
    MSEHasTimestamp,
    MSEGuidBit0,
    MSEGuidBit1,
    MSEFlags2,
    MSEGuidBit7,
    MSEHasMovementFlags,
    MSEHasOrientation,
    MSEGuidBit2,
    MSEHasSplineElevation,
    MSEHasUnknownBit,
    MSEGuidBit4,
    MSEHasFallDirection,
    MSEGuidBit5,
    MSEHasTransportData,
    MSEFlags,
    MSETransportGuidBit3,
    MSEHasTransportTime3,
    MSETransportGuidBit6,
    MSETransportGuidBit1,
    MSETransportGuidBit7,
    MSETransportGuidBit0,
    MSETransportGuidBit4,
    MSEHasTransportTime2,
    MSETransportGuidBit5,
    MSETransportGuidBit2,
    MSEHasPitch,
    MSEGuidByte5,
    MSEFallHorizontalSpeed,
    MSEFallCosAngle,
    MSEFallSinAngle,
    MSEFallVerticalSpeed,
    MSEFallTime,
    MSESplineElevation,
    MSEGuidByte7,
    MSEPositionY,
    MSEGuidByte3,
    MSETransportTime3,
    MSETransportGuidByte6,
    MSETransportSeat,
    MSETransportGuidByte5,
    MSETransportPositionX,
    MSETransportGuidByte1,
    MSETransportPositionO,
    MSETransportGuidByte2,
    MSETransportTime2,
    MSETransportGuidByte0,
    MSETransportPositionZ,
    MSETransportGuidByte7,
    MSETransportGuidByte4,
    MSETransportGuidByte3,
    MSETransportPositionY,
    MSETransportTime,
    MSEGuidByte4,
    MSEPositionX,
    MSEGuidByte6,
    MSEPositionZ,
    MSETimestamp,
    MSEGuidByte2,
    MSEPitch,
    MSEGuidByte0,
    MSEPositionO,
    MSEGuidByte1,
    MSEEnd,
};

static MovementStatusElements MovementFallLandSequence[] =
{
    MSEPositionX,
    MSEPositionY,
    MSEPositionZ,
    MSEHasTransportData,
    MSEGuidBit7,
    MSEGuidBit1,
    MSEHasMovementFlags2,
    MSEGuidBit3,
    MSEHasSplineElevation,
    MSEHasOrientation,
    MSEGuidBit6,
    MSEHasTimestamp,
    MSEHasUnknownBit,
    MSEHasPitch,
    MSEGuidBit4,
    MSEHasSpline,
    MSEGuidBit5,
    MSEHasMovementFlags,
    MSEHasFallData,
    MSEGuidBit0,
    MSEGuidBit2,
    MSETransportGuidBit0,
    MSETransportGuidBit5,
    MSETransportGuidBit3,
    MSETransportGuidBit2,
    MSEHasTransportTime3,
    MSEHasTransportTime2,
    MSETransportGuidBit6,
    MSETransportGuidBit4,
    MSETransportGuidBit1,
    MSETransportGuidBit7,
    MSEFlags2,
    MSEFlags,
    MSEHasFallDirection,
    MSEGuidByte1,
    MSEGuidByte7,
    MSEGuidByte4,
    MSEGuidByte3,
    MSEGuidByte6,
    MSEGuidByte0,
    MSEGuidByte2,
    MSEGuidByte5,
    MSETransportTime,
    MSETransportPositionZ,
    MSETransportPositionY,
    MSETransportPositionX,
    MSETransportGuidByte5,
    MSETransportTime3,
    MSETransportGuidByte1,
    MSETransportSeat,
    MSETransportTime2,
    MSETransportGuidByte4,
    MSETransportPositionO,
    MSETransportGuidByte0,
    MSETransportGuidByte7,
    MSETransportGuidByte3,
    MSETransportGuidByte6,
    MSETransportGuidByte2,
    MSEFallVerticalSpeed,
    MSEFallTime,
    MSEFallCosAngle,
    MSEFallHorizontalSpeed,
    MSEFallSinAngle,
    MSESplineElevation,
    MSETimestamp,
    MSEPitch,
    MSEPositionO,
    MSEEnd,
};

static MovementStatusElements MovementHeartBeatSequence[] =
{
    MSEPositionZ,
    MSEPositionX,
    MSEPositionY,
    MSEHasPitch,
    MSEHasTimestamp,
    MSEHasFallData,
    MSEHasMovementFlags2,
    MSEHasTransportData,
    MSEGuidBit7,
    MSEGuidBit1,
    MSEGuidBit0,
    MSEGuidBit4,
    MSEGuidBit2,
    MSEHasOrientation,
    MSEGuidBit5,
    MSEGuidBit3,
    MSEHasSplineElevation,
    MSEHasSpline,
    MSEHasUnknownBit,
    MSEGuidBit6,
    MSEHasMovementFlags,
    MSEHasTransportTime3,
    MSETransportGuidBit4,
    MSETransportGuidBit2,
    MSEHasTransportTime2,
    MSETransportGuidBit5,
    MSETransportGuidBit7,
    MSETransportGuidBit6,
    MSETransportGuidBit0,
    MSETransportGuidBit3,
    MSETransportGuidBit1,
    MSEHasFallDirection,
    MSEFlags,
    MSEFlags2,
    MSEGuidByte3,
    MSEGuidByte6,
    MSEGuidByte1,
    MSEGuidByte7,
    MSEGuidByte2,
    MSEGuidByte5,
    MSEGuidByte0,
    MSEGuidByte4,
    MSETransportPositionZ,
    MSETransportSeat,
    MSETransportPositionO,
    MSETransportGuidByte4,
    MSETransportPositionY,
    MSETransportTime,
    MSETransportPositionX,
    MSETransportGuidByte5,
    MSETransportGuidByte1,
    MSETransportGuidByte3,
    MSETransportGuidByte7,
    MSETransportTime3,
    MSETransportTime2,
    MSETransportGuidByte2,
    MSETransportGuidByte0,
    MSETransportGuidByte6,
    MSEPositionO,
    MSEFallVerticalSpeed,
    MSEFallTime,
    MSEFallHorizontalSpeed,
    MSEFallSinAngle,
    MSEFallCosAngle,
    MSEPitch,
    MSESplineElevation,
    MSETimestamp,
    MSEEnd,
};

static MovementStatusElements MovementJumpSequence[] =
{
    MSEPositionY,
    MSEPositionX,
    MSEPositionZ,
    MSEHasTimestamp,
    MSEGuidBit5,
    MSEHasMovementFlags,
    MSEGuidBit4,
    MSEGuidBit6,
    MSEHasMovementFlags2,
    MSEGuidBit0,
    MSEHasTransportData,
    MSEGuidBit3,
    MSEHasPitch,
    MSEGuidBit7,
    MSEHasFallData,
    MSEHasSpline,
    MSEHasOrientation,
    MSEGuidBit1,
    MSEHasSplineElevation,
    MSEHasUnknownBit,
    MSEGuidBit2,
    MSETransportGuidBit3,
    MSETransportGuidBit7,
    MSETransportGuidBit6,
    MSETransportGuidBit0,
    MSETransportGuidBit5,
    MSETransportGuidBit1,
    MSETransportGuidBit4,
    MSEHasTransportTime3,
    MSEHasTransportTime2,
    MSETransportGuidBit2,
    MSEHasFallDirection,
    MSEFlags,
    MSEFlags2,
    MSEGuidByte6,
    MSEGuidByte5,
    MSEGuidByte4,
    MSEGuidByte0,
    MSEGuidByte2,
    MSEGuidByte3,
    MSEGuidByte7,
    MSEGuidByte1,
    MSETransportGuidByte1,
    MSETransportGuidByte7,
    MSETransportPositionX,
    MSETransportGuidByte4,
    MSETransportTime3,
    MSETransportGuidByte0,
    MSETransportPositionO,
    MSETransportTime2,
    MSETransportTime,
    MSETransportGuidByte6,
    MSETransportPositionZ,
    MSETransportSeat,
    MSETransportPositionY,
    MSETransportGuidByte3,
    MSETransportGuidByte2,
    MSETransportGuidByte5,
    MSEPitch,
    MSETimestamp,
    MSEFallCosAngle,
    MSEFallSinAngle,
    MSEFallHorizontalSpeed,
    MSEFallVerticalSpeed,
    MSEFallTime,
    MSESplineElevation,
    MSEPositionO,
    MSEEnd,
};

static MovementStatusElements MovementSetFacingSequence[] =
{
    MSEPositionX,
    MSEPositionY,
    MSEPositionZ,
    MSEGuidBit6,
    MSEHasTransportData,
    MSEGuidBit4,
    MSEHasSpline,
    MSEGuidBit0,
    MSEHasOrientation,
    MSEHasTimestamp,
    MSEHasPitch,
    MSEHasMovementFlags2,
    MSEGuidBit5,
    MSEGuidBit7,
    MSEGuidBit2,
    MSEHasFallData,
    MSEHasSplineElevation,
    MSEHasMovementFlags,
    MSEGuidBit3,
    MSEHasUnknownBit,
    MSEGuidBit1,
    MSEHasTransportTime3,
    MSETransportGuidBit3,
    MSETransportGuidBit7,
    MSETransportGuidBit5,
    MSETransportGuidBit2,
    MSETransportGuidBit6,
    MSETransportGuidBit0,
    MSEHasTransportTime2,
    MSETransportGuidBit4,
    MSETransportGuidBit1,
    MSEHasFallDirection,
    MSEFlags2,
    MSEFlags,
    MSEGuidByte6,
    MSEGuidByte7,
    MSEGuidByte2,
    MSEGuidByte0,
    MSEGuidByte4,
    MSEGuidByte1,
    MSEGuidByte5,
    MSEGuidByte3,
    MSETransportGuidByte0,
    MSETransportPositionX,
    MSETransportGuidByte1,
    MSETransportTime2,
    MSETransportGuidByte4,
    MSETransportPositionZ,
    MSETransportPositionO,
    MSETransportGuidByte2,
    MSETransportTime3,
    MSETransportGuidByte3,
    MSETransportSeat,
    MSETransportPositionY,
    MSETransportGuidByte5,
    MSETransportGuidByte6,
    MSETransportTime,
    MSETransportGuidByte7,
    MSEFallHorizontalSpeed,
    MSEFallSinAngle,
    MSEFallCosAngle,
    MSEFallTime,
    MSEFallVerticalSpeed,
    MSESplineElevation,
    MSEPositionO,
    MSETimestamp,
    MSEPitch,
    MSEEnd,
};

static MovementStatusElements MovementSetPitchSequence[] =
{
    MSEPositionX,
    MSEPositionZ,
    MSEPositionY,
    MSEHasFallData,
    MSEHasMovementFlags,
    MSEGuidBit1,
    MSEHasOrientation,
    MSEGuidBit7,
    MSEGuidBit3,
    MSEHasMovementFlags2,
    MSEHasTransportData,
    MSEHasSplineElevation,
    MSEGuidBit6,
    MSEHasPitch,
    MSEGuidBit4,
    MSEHasSpline,
    MSEGuidBit2,
    MSEHasUnknownBit,
    MSEHasTimestamp,
    MSEGuidBit0,
    MSEGuidBit5,
    MSETransportGuidBit3,
    MSETransportGuidBit6,
    MSETransportGuidBit2,
    MSETransportGuidBit4,
    MSETransportGuidBit0,
    MSETransportGuidBit1,
    MSETransportGuidBit5,
    MSEHasTransportTime3,
    MSETransportGuidBit7,
    MSEHasTransportTime2,
    MSEFlags2,
    MSEFlags,
    MSEHasFallDirection,
    MSEGuidByte3,
    MSEGuidByte7,
    MSEGuidByte1,
    MSEGuidByte6,
    MSEGuidByte0,
    MSEGuidByte5,
    MSEGuidByte2,
    MSEGuidByte4,
    MSETransportGuidByte4,
    MSETransportGuidByte3,
    MSETransportGuidByte6,
    MSETransportPositionO,
    MSETransportGuidByte1,
    MSETransportTime3,
    MSETransportTime,
    MSETransportGuidByte2,
    MSETransportPositionZ,
    MSETransportGuidByte0,
    MSETransportTime2,
    MSETransportPositionY,
    MSETransportGuidByte5,
    MSETransportSeat,
    MSETransportGuidByte7,
    MSETransportPositionX,
    MSEFallVerticalSpeed,
    MSEFallTime,
    MSEFallHorizontalSpeed,
    MSEFallCosAngle,
    MSEFallSinAngle,
    MSEPitch,
    MSESplineElevation,
    MSETimestamp,
    MSEPositionO,
    MSEEnd,
};

static MovementStatusElements MovementStartBackwardSequence[] =
{
    MSEPositionX,
    MSEPositionZ,
    MSEPositionY,
    MSEHasTransportData,
    MSEGuidBit3,
    MSEGuidBit0,
    MSEGuidBit2,
    MSEHasTimestamp,
    MSEGuidBit7,
    MSEHasPitch,
    MSEHasUnknownBit,
    MSEHasMovementFlags,
    MSEHasOrientation,
    MSEHasSpline,
    MSEHasMovementFlags2,
    MSEHasFallData,
    MSEGuidBit5,
    MSEGuidBit1,
    MSEGuidBit4,
    MSEGuidBit6,
    MSEHasSplineElevation,
    MSETransportGuidBit3,
    MSETransportGuidBit1,
    MSEHasTransportTime2,
    MSETransportGuidBit2,
    MSETransportGuidBit7,
    MSETransportGuidBit0,
    MSETransportGuidBit6,
    MSETransportGuidBit5,
    MSETransportGuidBit4,
    MSEHasTransportTime3,
    MSEFlags,
    MSEFlags2,
    MSEHasFallDirection,
    MSEGuidByte6,
    MSEGuidByte7,
    MSEGuidByte4,
    MSEGuidByte1,
    MSEGuidByte5,
    MSEGuidByte0,
    MSEGuidByte2,
    MSEGuidByte3,
    MSETransportPositionZ,
    MSETransportGuidByte2,
    MSETransportTime3,
    MSETransportGuidByte0,
    MSETransportGuidByte5,
    MSETransportPositionY,
    MSETransportGuidByte1,
    MSETransportPositionX,
    MSETransportTime2,
    MSETransportGuidByte4,
    MSETransportPositionO,
    MSETransportSeat,
    MSETransportGuidByte7,
    MSETransportTime,
    MSETransportGuidByte6,
    MSETransportGuidByte3,
    MSEPitch,
    MSETimestamp,
    MSEFallHorizontalSpeed,
    MSEFallSinAngle,
    MSEFallCosAngle,
    MSEFallVerticalSpeed,
    MSEFallTime,
    MSEPositionO,
    MSESplineElevation,
    MSEEnd,
};

static MovementStatusElements MovementStartForwardSequence[] =
{
    MSEPositionY,
    MSEPositionZ,
    MSEPositionX,
    MSEGuidBit5,
    MSEGuidBit2,
    MSEGuidBit0,
    MSEHasUnknownBit,
    MSEHasMovementFlags,
    MSEGuidBit7,
    MSEGuidBit3,
    MSEGuidBit1,
    MSEHasOrientation,
    MSEGuidBit6,
    MSEHasSpline,
    MSEHasSplineElevation,
    MSEGuidBit4,
    MSEHasTransportData,
    MSEHasTimestamp,
    MSEHasPitch,
    MSEHasMovementFlags2,
    MSEHasFallData,
    MSEFlags,
    MSETransportGuidBit3,
    MSETransportGuidBit4,
    MSETransportGuidBit6,
    MSETransportGuidBit2,
    MSETransportGuidBit5,
    MSETransportGuidBit0,
    MSETransportGuidBit7,
    MSETransportGuidBit1,
    MSEHasTransportTime3,
    MSEHasTransportTime2,
    MSEHasFallDirection,
    MSEFlags2,
    MSEGuidByte2,
    MSEGuidByte4,
    MSEGuidByte6,
    MSEGuidByte1,
    MSEGuidByte7,
    MSEGuidByte3,
    MSEGuidByte5,
    MSEGuidByte0,
    MSEFallVerticalSpeed,
    MSEFallHorizontalSpeed,
    MSEFallCosAngle,
    MSEFallSinAngle,
    MSEFallTime,
    MSETransportGuidByte3,
    MSETransportPositionY,
    MSETransportPositionZ,
    MSETransportGuidByte1,
    MSETransportGuidByte4,
    MSETransportGuidByte7,
    MSETransportPositionO,
    MSETransportGuidByte2,
    MSETransportPositionX,
    MSETransportGuidByte5,
    MSETransportTime3,
    MSETransportTime,
    MSETransportGuidByte6,
    MSETransportGuidByte0,
    MSETransportSeat,
    MSETransportTime2,
    MSESplineElevation,
    MSEPitch,
    MSEPositionO,
    MSETimestamp,
    MSEEnd,
};

static MovementStatusElements MovementStartStrafeLeftSequence[] =
{
    MSEPositionZ,
    MSEPositionX,
    MSEPositionY,
    MSEHasSplineElevation,
    MSEGuidBit5,
    MSEHasPitch,
    MSEGuidBit6,
    MSEHasTimestamp,
    MSEGuidBit1,
    MSEHasUnknownBit,
    MSEGuidBit4,
    MSEGuidBit0,
    MSEGuidBit2,
    MSEHasFallData,
    MSEHasOrientation,
    MSEGuidBit3,
    MSEHasMovementFlags2,
    MSEGuidBit7,
    MSEHasSpline,
    MSEHasMovementFlags,
    MSEHasTransportData,
    MSEHasFallDirection,
    MSEHasTransportTime2,
    MSETransportGuidBit7,
    MSEHasTransportTime3,
    MSETransportGuidBit3,
    MSETransportGuidBit1,
    MSETransportGuidBit6,
    MSETransportGuidBit5,
    MSETransportGuidBit2,
    MSETransportGuidBit4,
    MSETransportGuidBit0,
    MSEFlags,
    MSEFlags2,
    MSEGuidByte2,
    MSEGuidByte6,
    MSEGuidByte3,
    MSEGuidByte1,
    MSEGuidByte0,
    MSEGuidByte7,
    MSEGuidByte4,
    MSEGuidByte5,
    MSEFallSinAngle,
    MSEFallHorizontalSpeed,
    MSEFallCosAngle,
    MSEFallTime,
    MSEFallVerticalSpeed,
    MSETransportSeat,
    MSETransportGuidByte2,
    MSETransportTime2,
    MSETransportGuidByte3,
    MSETransportPositionZ,
    MSETransportTime3,
    MSETransportGuidByte0,
    MSETransportGuidByte7,
    MSETransportPositionY,
    MSETransportGuidByte5,
    MSETransportGuidByte1,
    MSETransportPositionO,
    MSETransportTime,
    MSETransportGuidByte6,
    MSETransportGuidByte4,
    MSETransportPositionX,
    MSETimestamp,
    MSEPositionO,
    MSEPitch,
    MSESplineElevation,
    MSEEnd,
};

static MovementStatusElements MovementStartStrafeRightSequence[] =
{
    MSEPositionY,
    MSEPositionX,
    MSEPositionZ,
    MSEHasPitch,
    MSEGuidBit1,
    MSEHasOrientation,
    MSEGuidBit4,
    MSEHasSpline,
    MSEHasUnknownBit,
    MSEGuidBit5,
    MSEHasFallData,
    MSEHasSplineElevation,
    MSEHasTimestamp,
    MSEHasMovementFlags,
    MSEGuidBit2,
    MSEGuidBit7,
    MSEGuidBit6,
    MSEGuidBit3,
    MSEHasMovementFlags2,
    MSEHasTransportData,
    MSEGuidBit0,
    MSETransportGuidBit7,
    MSETransportGuidBit2,
    MSETransportGuidBit3,
    MSETransportGuidBit5,
    MSETransportGuidBit0,
    MSEHasTransportTime2,
    MSETransportGuidBit6,
    MSETransportGuidBit1,
    MSETransportGuidBit4,
    MSEHasTransportTime3,
    MSEFlags2,
    MSEFlags,
    MSEHasFallDirection,
    MSEGuidByte7,
    MSEGuidByte5,
    MSEGuidByte3,
    MSEGuidByte1,
    MSEGuidByte2,
    MSEGuidByte4,
    MSEGuidByte6,
    MSEGuidByte0,
    MSETransportGuidByte5,
    MSETransportGuidByte1,
    MSETransportGuidByte6,
    MSETransportPositionY,
    MSETransportPositionO,
    MSETransportGuidByte0,
    MSETransportGuidByte2,
    MSETransportSeat,
    MSETransportPositionX,
    MSETransportTime3,
    MSETransportTime,
    MSETransportGuidByte4,
    MSETransportGuidByte7,
    MSETransportTime2,
    MSETransportPositionZ,
    MSETransportGuidByte3,
    MSEPitch,
    MSEPositionO,
    MSEFallCosAngle,
    MSEFallSinAngle,
    MSEFallHorizontalSpeed,
    MSEFallTime,
    MSEFallVerticalSpeed,
    MSETimestamp,
    MSESplineElevation,
    MSEEnd,
};

static MovementStatusElements MovementStartTurnLeftSequence[] =
{
    MSEPositionY,
    MSEPositionX,
    MSEPositionZ,
    MSEHasUnknownBit,
    MSEGuidBit1,
    MSEHasOrientation,
    MSEHasSpline,
    MSEHasMovementFlags,
    MSEGuidBit4,
    MSEGuidBit2,
    MSEHasMovementFlags2,
    MSEGuidBit5,
    MSEGuidBit7,
    MSEHasTransportData,
    MSEGuidBit6,
    MSEHasSplineElevation,
    MSEGuidBit0,
    MSEGuidBit3,
    MSEHasPitch,
    MSEHasTimestamp,
    MSEHasFallData,
    MSEFlags2,
    MSETransportGuidBit3,
    MSETransportGuidBit1,
    MSETransportGuidBit0,
    MSEHasTransportTime2,
    MSETransportGuidBit2,
    MSEHasTransportTime3,
    MSETransportGuidBit4,
    MSETransportGuidBit7,
    MSETransportGuidBit5,
    MSETransportGuidBit6,
    MSEHasFallDirection,
    MSEFlags,
    MSEGuidByte0,
    MSEGuidByte4,
    MSEGuidByte7,
    MSEGuidByte5,
    MSEGuidByte6,
    MSEGuidByte3,
    MSEGuidByte2,
    MSEGuidByte1,
    MSEFallSinAngle,
    MSEFallCosAngle,
    MSEFallHorizontalSpeed,
    MSEFallVerticalSpeed,
    MSEFallTime,
    MSETransportGuidByte0,
    MSETransportPositionX,
    MSETransportTime,
    MSETransportSeat,
    MSETransportPositionZ,
    MSETransportGuidByte4,
    MSETransportPositionO,
    MSETransportGuidByte2,
    MSETransportGuidByte6,
    MSETransportGuidByte1,
    MSETransportGuidByte3,
    MSETransportPositionY,
    MSETransportTime3,
    MSETransportTime2,
    MSETransportGuidByte5,
    MSETransportGuidByte7,
    MSETimestamp,
    MSEPitch,
    MSEPositionO,
    MSESplineElevation,
    MSEEnd,
};

static MovementStatusElements MovementStartTurnRightSequence[] =
{
    MSEPositionX,
    MSEPositionZ,
    MSEPositionY,
    MSEGuidBit3,
    MSEGuidBit5,
    MSEHasMovementFlags,
    MSEHasSpline,
    MSEGuidBit0,
    MSEHasOrientation,
    MSEHasTransportData,
    MSEGuidBit7,
    MSEHasUnknownBit,
    MSEHasMovementFlags2,
    MSEGuidBit1,
    MSEHasTimestamp,
    MSEGuidBit6,
    MSEGuidBit2,
    MSEGuidBit4,
    MSEHasSplineElevation,
    MSEHasPitch,
    MSEHasFallData,
    MSETransportGuidBit1,
    MSEHasTransportTime2,
    MSETransportGuidBit6,
    MSETransportGuidBit0,
    MSETransportGuidBit3,
    MSETransportGuidBit5,
    MSETransportGuidBit2,
    MSETransportGuidBit4,
    MSETransportGuidBit7,
    MSEHasTransportTime3,
    MSEFlags2,
    MSEFlags,
    MSEHasFallDirection,
    MSEGuidByte5,
    MSEGuidByte0,
    MSEGuidByte7,
    MSEGuidByte3,
    MSEGuidByte2,
    MSEGuidByte1,
    MSEGuidByte4,
    MSEGuidByte6,
    MSETransportPositionY,
    MSETransportGuidByte0,
    MSETransportGuidByte4,
    MSETransportGuidByte1,
    MSETransportGuidByte6,
    MSETransportGuidByte2,
    MSETransportSeat,
    MSETransportPositionO,
    MSETransportGuidByte5,
    MSETransportTime3,
    MSETransportPositionZ,
    MSETransportPositionX,
    MSETransportTime,
    MSETransportGuidByte7,
    MSETransportGuidByte3,
    MSETransportTime2,
    MSEFallHorizontalSpeed,
    MSEFallSinAngle,
    MSEFallCosAngle,
    MSEFallTime,
    MSEFallVerticalSpeed,
    MSEPitch,
    MSEPositionO,
    MSESplineElevation,
    MSETimestamp,
    MSEEnd,
};

static MovementStatusElements MovementStopSequence[] =
{
    MSEPositionX,
    MSEPositionY,
    MSEPositionZ,
    MSEGuidBit3,
    MSEGuidBit6,
    MSEHasSplineElevation,
    MSEHasSpline,
    MSEHasOrientation,
    MSEGuidBit7,
    MSEHasMovementFlags,
    MSEGuidBit5,
    MSEHasFallData,
    MSEHasMovementFlags2,
    MSEHasTransportData,
    MSEHasTimestamp,
    MSEGuidBit4,
    MSEGuidBit1,
    MSEHasUnknownBit,
    MSEGuidBit2,
    MSEGuidBit0,
    MSEHasPitch,
    MSETransportGuidBit7,
    MSETransportGuidBit4,
    MSETransportGuidBit1,
    MSETransportGuidBit5,
    MSEHasTransportTime2,
    MSEHasTransportTime3,
    MSETransportGuidBit3,
    MSETransportGuidBit6,
    MSETransportGuidBit0,
    MSETransportGuidBit2,
    MSEFlags,
    MSEFlags2,
    MSEHasFallDirection,
    MSEGuidByte6,
    MSEGuidByte3,
    MSEGuidByte0,
    MSEGuidByte4,
    MSEGuidByte2,
    MSEGuidByte1,
    MSEGuidByte5,
    MSEGuidByte7,
    MSETransportGuidByte4,
    MSETransportGuidByte7,
    MSETransportTime,
    MSETransportSeat,
    MSETransportPositionZ,
    MSETransportTime3,
    MSETransportGuidByte2,
    MSETransportGuidByte0,
    MSETransportPositionY,
    MSETransportGuidByte1,
    MSETransportGuidByte3,
    MSETransportTime2,
    MSETransportPositionX,
    MSETransportPositionO,
    MSETransportGuidByte5,
    MSETransportGuidByte6,
    MSETimestamp,
    MSEPositionO,
    MSEPitch,
    MSESplineElevation,
    MSEFallCosAngle,
    MSEFallSinAngle,
    MSEFallHorizontalSpeed,
    MSEFallVerticalSpeed,
    MSEFallTime,
    MSEEnd,
};

static MovementStatusElements MovementStopStrafeSequence[] =
{
    MSEPositionY,
    MSEPositionZ,
    MSEPositionX,
    MSEHasPitch,
    MSEHasTimestamp,
    MSEGuidBit2,
    MSEHasFallData,
    MSEGuidBit7,
    MSEHasSplineElevation,
    MSEGuidBit3,
    MSEHasOrientation,
    MSEHasMovementFlags2,
    MSEHasTransportData,
    MSEHasMovementFlags,
    MSEHasSpline,
    MSEGuidBit0,
    MSEHasUnknownBit,
    MSEGuidBit6,
    MSEGuidBit5,
    MSEGuidBit1,
    MSEGuidBit4,
    MSETransportGuidBit7,
    MSETransportGuidBit0,
    MSETransportGuidBit4,
    MSETransportGuidBit2,
    MSETransportGuidBit6,
    MSETransportGuidBit5,
    MSEHasTransportTime2,
    MSETransportGuidBit1,
    MSETransportGuidBit3,
    MSEHasTransportTime3,
    MSEFlags,
    MSEHasFallDirection,
    MSEFlags2,
    MSEGuidByte2,
    MSEGuidByte7,
    MSEGuidByte3,
    MSEGuidByte4,
    MSEGuidByte5,
    MSEGuidByte6,
    MSEGuidByte1,
    MSEGuidByte0,
    MSETransportSeat,
    MSETransportGuidByte6,
    MSETransportPositionZ,
    MSETransportTime3,
    MSETransportGuidByte1,
    MSETransportGuidByte3,
    MSETransportGuidByte2,
    MSETransportGuidByte4,
    MSETransportGuidByte5,
    MSETransportTime,
    MSETransportPositionO,
    MSETransportPositionX,
    MSETransportGuidByte0,
    MSETransportPositionY,
    MSETransportTime2,
    MSETransportGuidByte7,
    MSEFallCosAngle,
    MSEFallHorizontalSpeed,
    MSEFallSinAngle,
    MSEFallTime,
    MSEFallVerticalSpeed,
    MSESplineElevation,
    MSEPositionO,
    MSEPitch,
    MSETimestamp,
    MSEEnd,
};

static MovementStatusElements MovementStopTurnSequence[] =
{
    MSEPositionX,
    MSEPositionZ,
    MSEPositionY,
    MSEGuidBit5,
    MSEGuidBit4,
    MSEHasFallData,
    MSEHasUnknownBit,
    MSEGuidBit1,
    MSEGuidBit0,
    MSEHasSpline,
    MSEHasMovementFlags,
    MSEGuidBit2,
    MSEGuidBit6,
    MSEHasPitch,
    MSEHasTransportData,
    MSEGuidBit3,
    MSEHasSplineElevation,
    MSEHasTimestamp,
    MSEHasMovementFlags2,
    MSEHasOrientation,
    MSEGuidBit7,
    MSETransportGuidBit2,
    MSETransportGuidBit7,
    MSEHasTransportTime3,
    MSETransportGuidBit4,
    MSEHasTransportTime2,
    MSETransportGuidBit5,
    MSETransportGuidBit0,
    MSETransportGuidBit3,
    MSETransportGuidBit6,
    MSETransportGuidBit1,
    MSEHasFallDirection,
    MSEFlags,
    MSEFlags2,
    MSEGuidByte3,
    MSEGuidByte2,
    MSEGuidByte6,
    MSEGuidByte4,
    MSEGuidByte0,
    MSEGuidByte7,
    MSEGuidByte1,
    MSEGuidByte5,
    MSESplineElevation,
    MSETransportPositionX,
    MSETransportGuidByte5,
    MSETransportSeat,
    MSETransportGuidByte2,
    MSETransportGuidByte3,
    MSETransportPositionO,
    MSETransportTime2,
    MSETransportTime3,
    MSETransportGuidByte7,
    MSETransportGuidByte1,
    MSETransportGuidByte0,
    MSETransportGuidByte4,
    MSETransportPositionY,
    MSETransportPositionZ,
    MSETransportTime,
    MSETransportGuidByte6,
    MSEFallTime,
    MSEFallHorizontalSpeed,
    MSEFallCosAngle,
    MSEFallSinAngle,
    MSEFallVerticalSpeed,
    MSETimestamp,
    MSEPitch,
    MSEPositionO,
    MSEEnd,
};

static MovementStatusElements MovementStartAscendSequence[] =
{
    MSEPositionX,
    MSEPositionY,
    MSEPositionZ,
    MSEGuidBit0,
    MSEGuidBit1,
    MSEGuidBit7,
    MSEHasUnknownBit,
    MSEGuidBit5,
    MSEHasTransportData,
    MSEGuidBit2,
    MSEHasSplineElevation,
    MSEHasFallData,
    MSEHasSpline,
    MSEGuidBit3,
    MSEHasMovementFlags2,
    MSEGuidBit6,
    MSEHasMovementFlags,
    MSEHasPitch,
    MSEHasTimestamp,
    MSEHasOrientation,
    MSEGuidBit4,
    MSEFlags,
    MSETransportGuidBit0,
    MSETransportGuidBit2,
    MSEHasTransportTime3,
    MSETransportGuidBit6,
    MSETransportGuidBit1,
    MSETransportGuidBit4,
    MSEHasTransportTime2,
    MSETransportGuidBit5,
    MSETransportGuidBit3,
    MSETransportGuidBit7,
    MSEFlags2,
    MSEHasFallDirection,
    MSEGuidByte6,
    MSEGuidByte3,
    MSEGuidByte1,
    MSEGuidByte4,
    MSEGuidByte2,
    MSEGuidByte0,
    MSEGuidByte5,
    MSEGuidByte7,
    MSETransportGuidByte3,
    MSETransportGuidByte5,
    MSETransportGuidByte4,
    MSETransportSeat,
    MSETransportGuidByte2,
    MSETransportPositionO,
    MSETransportPositionY,
    MSETransportGuidByte7,
    MSETransportTime2,
    MSETransportPositionZ,
    MSETransportTime3,
    MSETransportGuidByte6,
    MSETransportTime,
    MSETransportGuidByte0,
    MSETransportGuidByte1,
    MSETransportPositionX,
    MSEFallCosAngle,
    MSEFallSinAngle,
    MSEFallHorizontalSpeed,
    MSEFallTime,
    MSEFallVerticalSpeed,
    MSEPositionO,
    MSEPitch,
    MSETimestamp,
    MSESplineElevation,
    MSEEnd,
};

static MovementStatusElements MovementStartDescendSequence[] =
{
    MSEPositionY,
    MSEPositionZ,
    MSEPositionX,
    MSEGuidBit0,
    MSEHasPitch,
    MSEHasFallData,
    MSEGuidBit4,
    MSEHasOrientation,
    MSEHasTimestamp,
    MSEHasMovementFlags2,
    MSEHasMovementFlags,
    MSEGuidBit6,
    MSEHasUnknownBit,
    MSEGuidBit1,
    MSEHasTransportData,
    MSEHasSpline,
    MSEHasSplineElevation,
    MSEGuidBit5,
    MSEGuidBit3,
    MSEGuidBit7,
    MSEGuidBit2,
    MSETransportGuidBit0,
    MSETransportGuidBit1,
    MSETransportGuidBit2,
    MSEHasTransportTime3,
    MSETransportGuidBit7,
    MSETransportGuidBit4,
    MSETransportGuidBit6,
    MSEHasTransportTime2,
    MSETransportGuidBit3,
    MSETransportGuidBit5,
    MSEFlags2,
    MSEFlags,
    MSEHasFallDirection,
    MSEGuidByte2,
    MSEGuidByte7,
    MSEGuidByte6,
    MSEGuidByte0,
    MSEGuidByte1,
    MSEGuidByte5,
    MSEGuidByte4,
    MSEGuidByte3,
    MSEPitch,
    MSETransportPositionZ,
    MSETransportSeat,
    MSETransportTime3,
    MSETransportGuidByte6,
    MSETransportTime2,
    MSETransportGuidByte1,
    MSETransportTime,
    MSETransportGuidByte4,
    MSETransportPositionY,
    MSETransportPositionX,
    MSETransportGuidByte7,
    MSETransportGuidByte3,
    MSETransportGuidByte5,
    MSETransportGuidByte2,
    MSETransportPositionO,
    MSETransportGuidByte0,
    MSEFallTime,
    MSEFallSinAngle,
    MSEFallCosAngle,
    MSEFallHorizontalSpeed,
    MSEFallVerticalSpeed,
    MSETimestamp,
    MSEPositionO,
    MSESplineElevation,
    MSEEnd,
};

static MovementStatusElements MovementStartSwimSequence[] =
{
    MSEPositionZ,
    MSEPositionX,
    MSEPositionY,
    MSEGuidBit3,
    MSEHasSplineElevation,
    MSEGuidBit4,
    MSEGuidBit7,
    MSEHasUnknownBit,
    MSEHasPitch,
    MSEGuidBit0,
    MSEHasOrientation,
    MSEHasMovementFlags,
    MSEHasFallData,
    MSEGuidBit5,
    MSEHasTransportData,
    MSEHasMovementFlags2,
    MSEHasTimestamp,
    MSEGuidBit6,
    MSEGuidBit1,
    MSEHasSpline,
    MSEGuidBit2,
    MSETransportGuidBit2,
    MSETransportGuidBit3,
    MSETransportGuidBit7,
    MSETransportGuidBit5,
    MSETransportGuidBit4,
    MSETransportGuidBit0,
    MSEHasTransportTime2,
    MSETransportGuidBit6,
    MSETransportGuidBit1,
    MSEHasTransportTime3,
    MSEFlags,
    MSEHasFallDirection,
    MSEFlags2,
    MSEGuidByte0,
    MSEGuidByte2,
    MSEGuidByte1,
    MSEGuidByte5,
    MSEGuidByte4,
    MSEGuidByte6,
    MSEGuidByte3,
    MSEGuidByte7,
    MSEPitch,
    MSETransportTime2,
    MSETransportGuidByte2,
    MSETransportPositionY,
    MSETransportGuidByte3,
    MSETransportTime,
    MSETransportPositionX,
    MSETransportPositionO,
    MSETransportTime3,
    MSETransportGuidByte6,
    MSETransportGuidByte5,
    MSETransportGuidByte4,
    MSETransportPositionZ,
    MSETransportGuidByte1,
    MSETransportGuidByte7,
    MSETransportGuidByte0,
    MSETransportSeat,
    MSEFallCosAngle,
    MSEFallHorizontalSpeed,
    MSEFallSinAngle,
    MSEFallVerticalSpeed,
    MSEFallTime,
    MSEPositionO,
    MSETimestamp,
    MSESplineElevation,
    MSEEnd,
};

static MovementStatusElements MovementStopSwimSequence[] =
{
    MSEPositionX,
    MSEPositionY,
    MSEPositionZ,
    MSEHasSpline,
    MSEHasPitch,
    MSEGuidBit5,
    MSEGuidBit3,
    MSEGuidBit7,
    MSEHasSplineElevation,
    MSEHasMovementFlags,
    MSEGuidBit4,
    MSEHasMovementFlags2,
    MSEGuidBit2,
    MSEGuidBit6,
    MSEHasTransportData,
    MSEHasOrientation,
    MSEHasUnknownBit,
    MSEHasTimestamp,
    MSEGuidBit1,
    MSEGuidBit0,
    MSEHasFallData,
    MSEHasTransportTime3,
    MSETransportGuidBit4,
    MSETransportGuidBit6,
    MSETransportGuidBit3,
    MSETransportGuidBit7,
    MSETransportGuidBit1,
    MSETransportGuidBit0,
    MSEHasTransportTime2,
    MSETransportGuidBit2,
    MSETransportGuidBit5,
    MSEFlags,
    MSEFlags2,
    MSEHasFallDirection,
    MSEGuidByte0,
    MSEGuidByte4,
    MSEGuidByte3,
    MSEGuidByte6,
    MSEGuidByte7,
    MSEGuidByte1,
    MSEGuidByte5,
    MSEGuidByte2,
    MSETransportTime3,
    MSETransportGuidByte4,
    MSETransportTime,
    MSETransportPositionZ,
    MSETransportSeat,
    MSETransportGuidByte3,
    MSETransportGuidByte2,
    MSETransportPositionY,
    MSETransportGuidByte7,
    MSETransportGuidByte1,
    MSETransportGuidByte6,
    MSETransportGuidByte5,
    MSETransportTime2,
    MSETransportPositionX,
    MSETransportGuidByte0,
    MSETransportPositionO,
    MSEFallVerticalSpeed,
    MSEFallCosAngle,
    MSEFallHorizontalSpeed,
    MSEFallSinAngle,
    MSEFallTime,
    MSETimestamp,
    MSEPitch,
    MSEPositionO,
    MSESplineElevation,
    MSEEnd,
};

static MovementStatusElements MovementStopAscendSequence[] =
{
    MSEPositionZ,
    MSEPositionY,
    MSEPositionX,
    MSEGuidBit3,
    MSEGuidBit2,
    MSEHasFallData,
    MSEGuidBit7,
    MSEHasOrientation,
    MSEHasPitch,
    MSEHasSpline,
    MSEHasUnknownBit,
    MSEGuidBit1,
    MSEGuidBit4,
    MSEHasMovementFlags,
    MSEGuidBit0,
    MSEGuidBit6,
    MSEHasSplineElevation,
    MSEHasTransportData,
    MSEHasMovementFlags2,
    MSEHasTimestamp,
    MSEGuidBit5,
    MSEHasTransportTime2,
    MSEHasTransportTime3,
    MSETransportGuidBit1,
    MSETransportGuidBit3,
    MSETransportGuidBit2,
    MSETransportGuidBit5,
    MSETransportGuidBit7,
    MSETransportGuidBit4,
    MSETransportGuidBit6,
    MSETransportGuidBit0,
    MSEFlags2,
    MSEFlags,
    MSEHasFallDirection,
    MSEGuidByte7,
    MSEGuidByte5,
    MSEGuidByte4,
    MSEGuidByte3,
    MSEGuidByte2,
    MSEGuidByte1,
    MSEGuidByte0,
    MSEGuidByte6,
    MSETransportGuidByte5,
    MSETransportPositionY,
    MSETransportGuidByte7,
    MSETransportGuidByte2,
    MSETransportGuidByte6,
    MSETransportTime2,
    MSETransportTime3,
    MSETransportPositionO,
    MSETransportGuidByte3,
    MSETransportGuidByte4,
    MSETransportSeat,
    MSETransportGuidByte1,
    MSETransportTime,
    MSETransportGuidByte0,
    MSETransportPositionX,
    MSETransportPositionZ,
    MSEFallTime,
    MSEFallVerticalSpeed,
    MSEFallCosAngle,
    MSEFallSinAngle,
    MSEFallHorizontalSpeed,
    MSEPitch,
    MSESplineElevation,
    MSETimestamp,
    MSEPositionO,
    MSEEnd,
};

static MovementStatusElements MovementStopPitchSequence[] =
{
    MSEPositionX,
    MSEPositionZ,
    MSEPositionY,
    MSEGuidBit0,
    MSEGuidBit5,
    MSEGuidBit3,
    MSEHasFallData,
    MSEGuidBit2,
    MSEGuidBit4,
    MSEGuidBit7,
    MSEHasPitch,
    MSEHasSpline,
    MSEHasOrientation,
    MSEHasUnknownBit,
    MSEHasMovementFlags2,
    MSEHasSplineElevation,
    MSEGuidBit6,
    MSEGuidBit1,
    MSEHasTimestamp,
    MSEHasTransportData,
    MSEHasMovementFlags,
    MSETransportGuidBit7,
    MSETransportGuidBit0,
    MSETransportGuidBit5,
    MSETransportGuidBit2,
    MSEHasTransportTime3,
    MSETransportGuidBit6,
    MSETransportGuidBit3,
    MSEHasTransportTime2,
    MSETransportGuidBit4,
    MSETransportGuidBit1,
    MSEHasFallDirection,
    MSEFlags2,
    MSEFlags,
    MSEGuidByte1,
    MSEGuidByte7,
    MSEGuidByte0,
    MSEGuidByte6,
    MSEGuidByte4,
    MSEGuidByte3,
    MSEGuidByte5,
    MSEGuidByte2,
    MSETimestamp,
    MSEFallHorizontalSpeed,
    MSEFallSinAngle,
    MSEFallCosAngle,
    MSEFallVerticalSpeed,
    MSEFallTime,
    MSETransportGuidByte5,
    MSETransportGuidByte2,
    MSETransportTime2,
    MSETransportPositionX,
    MSETransportPositionO,
    MSETransportGuidByte6,
    MSETransportGuidByte3,
    MSETransportGuidByte1,
    MSETransportPositionZ,
    MSETransportTime3,
    MSETransportGuidByte0,
    MSETransportGuidByte4,
    MSETransportTime,
    MSETransportPositionY,
    MSETransportSeat,
    MSETransportGuidByte7,
    MSESplineElevation,
    MSEPositionO,
    MSEPitch,
    MSEEnd,
};

static MovementStatusElements MovementStartPitchDownSequence[] =
{
    MSEPositionX,
    MSEPositionZ,
    MSEPositionY,
    MSEHasMovementFlags,
    MSEGuidBit7,
    MSEGuidBit6,
    MSEHasPitch,
    MSEHasUnknownBit,
    MSEGuidBit1,
    MSEGuidBit4,
    MSEHasTimestamp,
    MSEHasSplineElevation,
    MSEHasMovementFlags2,
    MSEHasTransportData,
    MSEGuidBit0,
    MSEGuidBit5,
    MSEGuidBit3,
    MSEHasSpline,
    MSEHasOrientation,
    MSEHasFallData,
    MSEGuidBit2,
    MSETransportGuidBit1,
    MSETransportGuidBit5,
    MSEHasTransportTime3,
    MSETransportGuidBit7,
    MSETransportGuidBit4,
    MSETransportGuidBit6,
    MSEHasTransportTime2,
    MSETransportGuidBit0,
    MSETransportGuidBit3,
    MSETransportGuidBit2,
    MSEFlags2,
    MSEHasFallDirection,
    MSEFlags,
    MSEGuidByte3,
    MSEGuidByte7,
    MSEGuidByte0,
    MSEGuidByte5,
    MSEGuidByte2,
    MSEGuidByte6,
    MSEGuidByte4,
    MSEGuidByte1,
    MSETransportTime3,
    MSETransportGuidByte3,
    MSETransportTime2,
    MSETransportGuidByte5,
    MSETransportGuidByte1,
    MSETransportPositionY,
    MSETransportGuidByte6,
    MSETransportGuidByte4,
    MSETransportTime,
    MSETransportPositionZ,
    MSETransportPositionX,
    MSETransportGuidByte0,
    MSETransportSeat,
    MSETransportGuidByte2,
    MSETransportGuidByte7,
    MSETransportPositionO,
    MSEFallSinAngle,
    MSEFallHorizontalSpeed,
    MSEFallCosAngle,
    MSEFallVerticalSpeed,
    MSEFallTime,
    MSEPitch,
    MSEPositionO,
    MSESplineElevation,
    MSETimestamp,
    MSEEnd,
};

static MovementStatusElements MovementStartPitchUpSequence[] =
{
    MSEPositionZ,
    MSEPositionY,
    MSEPositionX,
    MSEGuidBit4,
    MSEHasMovementFlags,
    MSEHasMovementFlags2,
    MSEHasSpline,
    MSEGuidBit2,
    MSEGuidBit6,
    MSEGuidBit3,
    MSEHasUnknownBit,
    MSEHasSplineElevation,
    MSEHasFallData,
    MSEGuidBit0,
    MSEHasTransportData,
    MSEGuidBit1,
    MSEGuidBit5,
    MSEHasPitch,
    MSEHasTimestamp,
    MSEHasOrientation,
    MSEGuidBit7,
    MSEFlags2,
    MSETransportGuidBit7,
    MSETransportGuidBit3,
    MSETransportGuidBit1,
    MSEHasTransportTime2,
    MSETransportGuidBit4,
    MSEHasTransportTime3,
    MSETransportGuidBit0,
    MSETransportGuidBit6,
    MSETransportGuidBit5,
    MSETransportGuidBit2,
    MSEFlags,
    MSEHasFallDirection,
    MSEGuidByte0,
    MSEGuidByte3,
    MSEGuidByte4,
    MSEGuidByte6,
    MSEGuidByte7,
    MSEGuidByte1,
    MSEGuidByte5,
    MSEGuidByte2,
    MSETransportPositionX,
    MSETransportGuidByte1,
    MSETransportGuidByte3,
    MSETransportGuidByte2,
    MSETransportGuidByte0,
    MSETransportTime,
    MSETransportPositionZ,
    MSETransportPositionO,
    MSETransportGuidByte7,
    MSETransportTime2,
    MSETransportSeat,
    MSETransportGuidByte6,
    MSETransportGuidByte5,
    MSETransportTime3,
    MSETransportPositionY,
    MSETransportGuidByte4,
    MSEFallTime,
    MSEFallCosAngle,
    MSEFallSinAngle,
    MSEFallHorizontalSpeed,
    MSEFallVerticalSpeed,
    MSEPositionO,
    MSESplineElevation,
    MSEPitch,
    MSETimestamp,
    MSEEnd,
};

static MovementStatusElements MovementChngTransportSequence[] =
{
    MSEPositionY,
    MSEPositionX,
    MSEPositionZ,
    MSEGuidBit4,
    MSEGuidBit0,
    MSEGuidBit2,
    MSEHasTransportData,
    MSEHasSpline,
    MSEHasOrientation,
    MSEGuidBit6,
    MSEHasTimestamp,
    MSEGuidBit5,
    MSEGuidBit7,
    MSEHasPitch,
    MSEHasUnknownBit,
    MSEGuidBit3,
    MSEHasSplineElevation,
    MSEGuidBit1,
    MSEHasFallData,
    MSEHasMovementFlags,
    MSEHasMovementFlags2,
    MSETransportGuidBit3,
    MSEHasTransportTime3,
    MSETransportGuidBit4,
    MSETransportGuidBit1,
    MSETransportGuidBit6,
    MSETransportGuidBit2,
    MSEHasTransportTime2,
    MSETransportGuidBit0,
    MSETransportGuidBit7,
    MSETransportGuidBit5,
    MSEFlags,
    MSEFlags2,
    MSEHasFallDirection,
    MSEGuidByte7,
    MSEGuidByte5,
    MSEGuidByte1,
    MSEGuidByte2,
    MSEGuidByte6,
    MSEGuidByte4,
    MSEGuidByte0,
    MSEGuidByte3,
    MSETransportPositionY,
    MSETransportSeat,
    MSETransportGuidByte1,
    MSETransportGuidByte0,
    MSETransportGuidByte2,
    MSETransportGuidByte3,
    MSETransportGuidByte6,
    MSETransportPositionZ,
    MSETransportPositionX,
    MSETransportTime3,
    MSETransportTime,
    MSETransportGuidByte7,
    MSETransportGuidByte5,
    MSETransportGuidByte4,
    MSETransportPositionO,
    MSETransportTime2,
    MSEFallTime,
    MSEFallHorizontalSpeed,
    MSEFallCosAngle,
    MSEFallSinAngle,
    MSEFallVerticalSpeed,
    MSEPositionO,
    MSEPitch,
    MSESplineElevation,
    MSETimestamp,
    MSEEnd,
};

static MovementStatusElements MovementSetRunModeSequence[] =
{
    MSEPositionY,
    MSEPositionX,
    MSEPositionZ,
    MSEHasTimestamp,
    MSEHasMovementFlags2,
    MSEGuidBit1,
    MSEHasSpline,
    MSEHasMovementFlags,
    MSEGuidBit7,
    MSEHasTransportData,
    MSEHasUnknownBit,
    MSEGuidBit0,
    MSEGuidBit3,
    MSEHasSplineElevation,
    MSEGuidBit5,
    MSEHasPitch,
    MSEGuidBit6,
    MSEGuidBit4,
    MSEHasFallData,
    MSEHasOrientation,
    MSEGuidBit2,
    MSETransportGuidBit6,
    MSETransportGuidBit4,
    MSEHasTransportTime3,
    MSETransportGuidBit5,
    MSETransportGuidBit3,
    MSETransportGuidBit1,
    MSEHasTransportTime2,
    MSETransportGuidBit7,
    MSETransportGuidBit0,
    MSETransportGuidBit2,
    MSEHasFallDirection,
    MSEFlags2,
    MSEFlags,
    MSEGuidByte3,
    MSEGuidByte6,
    MSEGuidByte0,
    MSEGuidByte7,
    MSEGuidByte4,
    MSEGuidByte1,
    MSEGuidByte5,
    MSEGuidByte2,
    MSEPitch,
    MSETransportTime2,
    MSETransportGuidByte3,
    MSETransportPositionX,
    MSETransportSeat,
    MSETransportGuidByte5,
    MSETransportGuidByte1,
    MSETransportPositionZ,
    MSETransportGuidByte2,
    MSETransportGuidByte7,
    MSETransportPositionO,
    MSETransportGuidByte4,
    MSETransportTime,
    MSETransportTime3,
    MSETransportGuidByte0,
    MSETransportPositionY,
    MSETransportGuidByte6,
    MSEFallSinAngle,
    MSEFallHorizontalSpeed,
    MSEFallCosAngle,
    MSEFallTime,
    MSEFallVerticalSpeed,
    MSESplineElevation,
    MSETimestamp,
    MSEPositionO,
    MSEEnd,
};

static MovementStatusElements MovementSetWalkModeSequence[] =
{
    MSEPositionY,
    MSEPositionX,
    MSEPositionZ,
    MSEGuidBit6,
    MSEHasSpline,
    MSEHasTimestamp,
    MSEGuidBit0,
    MSEGuidBit1,
    MSEHasMovementFlags,
    MSEHasPitch,
    MSEGuidBit7,
    MSEHasSplineElevation,
    MSEGuidBit4,
    MSEHasOrientation,
    MSEHasTransportData,
    MSEGuidBit2,
    MSEGuidBit5,
    MSEGuidBit3,
    MSEHasUnknownBit,
    MSEHasMovementFlags2,
    MSEHasFallData,
    MSETransportGuidBit2,
    MSETransportGuidBit0,
    MSETransportGuidBit6,
    MSETransportGuidBit1,
    MSETransportGuidBit3,
    MSEHasTransportTime2,
    MSETransportGuidBit5,
    MSEHasTransportTime3,
    MSETransportGuidBit4,
    MSETransportGuidBit7,
    MSEHasFallDirection,
    MSEFlags,
    MSEFlags2,
    MSEGuidByte5,
    MSEGuidByte6,
    MSEGuidByte4,
    MSEGuidByte7,
    MSEGuidByte3,
    MSEGuidByte0,
    MSEGuidByte2,
    MSEGuidByte1,
    MSETransportGuidByte2,
    MSETransportGuidByte5,
    MSETransportSeat,
    MSETransportPositionZ,
    MSETransportGuidByte3,
    MSETransportGuidByte6,
    MSETransportGuidByte0,
    MSETransportTime,
    MSETransportGuidByte4,
    MSETransportTime2,
    MSETransportPositionO,
    MSETransportPositionX,
    MSETransportTime3,
    MSETransportGuidByte7,
    MSETransportPositionY,
    MSETransportGuidByte1,
    MSEFallCosAngle,
    MSEFallHorizontalSpeed,
    MSEFallSinAngle,
    MSEFallVerticalSpeed,
    MSEFallTime,
    MSESplineElevation,
    MSEPitch,
    MSETimestamp,
    MSEPositionO,
    MSEEnd,
};

static MovementStatusElements MovementFallResetSequence[] =
{
    MSEPositionZ,
    MSEPositionX,
    MSEPositionY,
    MSEGuidBit1,
    MSEHasTimestamp,
    MSEHasMovementFlags,
    MSEHasUnknownBit,
    MSEGuidBit6,
    MSEHasSplineElevation,
    MSEHasPitch,
    MSEGuidBit3,
    MSEHasTransportData,
    MSEGuidBit2,
    MSEHasMovementFlags2,
    MSEHasOrientation,
    MSEGuidBit4,
    MSEGuidBit5,
    MSEHasSpline,
    MSEGuidBit7,
    MSEGuidBit0,
    MSEHasFallData,
    MSETransportGuidBit0,
    MSETransportGuidBit1,
    MSETransportGuidBit5,
    MSETransportGuidBit4,
    MSEHasTransportTime2,
    MSETransportGuidBit2,
    MSEHasTransportTime3,
    MSETransportGuidBit6,
    MSETransportGuidBit7,
    MSETransportGuidBit3,
    MSEHasFallDirection,
    MSEFlags2,
    MSEFlags,
    MSEGuidByte4,
    MSEGuidByte0,
    MSEGuidByte1,
    MSEGuidByte7,
    MSEGuidByte5,
    MSEGuidByte2,
    MSEGuidByte3,
    MSEGuidByte6,
    MSETransportPositionX,
    MSETransportGuidByte7,
    MSETransportGuidByte2,
    MSETransportGuidByte3,
    MSETransportGuidByte5,
    MSETransportPositionY,
    MSETransportPositionZ,
    MSETransportSeat,
    MSETransportTime2,
    MSETransportGuidByte6,
    MSEHasTransportTime3,
    MSETransportGuidByte0,
    MSETransportPositionO,
    MSETransportGuidByte4,
    MSETransportGuidByte1,
    MSEFallVerticalSpeed,
    MSEFallCosAngle,
    MSEFallSinAngle,
    MSEFallHorizontalSpeed,
    MSEFallTime,
    MSEPositionO,
    MSETimestamp,
    MSESplineElevation,
    MSEPitch,
    MSEEnd,
};

static MovementStatusElements MovementSetCanFlyAckSequence[] =
{
    MSEPositionY,
    MSEMovementCounter,
    MSEPositionX,
    MSEPositionZ,
    MSEGuidBit3,
    MSEHasTimestamp,
    MSEGuidBit4,
    MSEGuidBit0,
    MSEHasOrientation,
    MSEHasFallData,
    MSEGuidBit2,
    MSEGuidBit5,
    MSEHasSplineElevation,
    MSEHasMovementFlags2,
    MSEHasUnknownBit,
    MSEGuidBit7,
    MSEHasSpline,
    MSEGuidBit6,
    MSEGuidBit1,
    MSEHasMovementFlags,
    MSEHasTransportData,
    MSEHasPitch,
    MSETransportGuidBit3,
    MSETransportGuidBit1,
    MSETransportGuidBit2,
    MSEHasTransportTime3,
    MSEHasTransportTime2,
    MSETransportGuidBit0,
    MSETransportGuidBit5,
    MSETransportGuidBit7,
    MSETransportGuidBit4,
    MSETransportGuidBit6,
    MSEFlags2,
    MSEFlags,
    MSEHasFallDirection,
    MSEGuidByte1,
    MSEGuidByte0,
    MSEGuidByte2,
    MSEGuidByte3,
    MSEGuidByte7,
    MSEGuidByte6,
    MSEGuidByte4,
    MSEGuidByte5,
    MSETransportTime2,
    MSETransportGuidByte6,
    MSETransportTime,
    MSETransportTime3,
    MSETransportGuidByte7,
    MSETransportPositionZ,
    MSETransportGuidByte3,
    MSETransportPositionY,
    MSETransportGuidByte5,
    MSETransportPositionX,
    MSETransportGuidByte2,
    MSETransportPositionO,
    MSETransportSeat,
    MSETransportGuidByte1,
    MSETransportGuidByte0,
    MSETransportGuidByte4,
    MSEFallTime,
    MSEFallCosAngle,
    MSEFallHorizontalSpeed,
    MSEFallSinAngle,
    MSEFallVerticalSpeed,
    MSEPitch,
    MSEPositionO,
    MSETimestamp,
    MSESplineElevation,
    MSEEnd,
};

static MovementStatusElements MovementCastSpellSequence[] =
{
    MSEPositionZ,
    MSEPositionY,
    MSEPositionX,
    MSEHasFallData,
    MSEHasTimestamp,
    MSEHasOrientation,
    MSEHasSpline,
    MSEHasUnknownBit,
    MSEGuidBit6,
    MSEGuidBit4,
    MSEHasMovementFlags2,
    MSEGuidBit3,
    MSEGuidBit5,
    MSEHasSplineElevation,
    MSEHasPitch,
    MSEGuidBit7,
    MSEHasTransportData,
    MSEGuidBit2,
    MSEHasMovementFlags,
    MSEGuidBit1,
    MSEGuidBit0,
    MSETransportGuidBit6,
    MSETransportGuidBit2,
    MSETransportGuidBit5,
    MSEHasTransportTime2,
    MSETransportGuidBit7,
    MSETransportGuidBit4,
    MSEHasTransportTime3,
    MSETransportGuidBit0,
    MSETransportGuidBit1,
    MSETransportGuidBit3,
    MSEFlags2,
    MSEFlags,
    MSEHasFallDirection,
    MSEGuidByte1,
    MSEGuidByte4,
    MSEGuidByte7,
    MSEGuidByte3,
    MSEGuidByte0,
    MSEGuidByte2,
    MSEGuidByte5,
    MSEGuidByte6,
    MSETransportSeat,
    MSETransportPositionO,
    MSETransportTime,
    MSETransportGuidByte6,
    MSETransportGuidByte5,
    MSETransportTime3,
    MSETransportPositionX,
    MSETransportGuidByte4,
    MSETransportPositionZ,
    MSETransportGuidByte2,
    MSETransportGuidByte0,
    MSETransportTime2,
    MSETransportGuidByte1,
    MSETransportGuidByte3,
    MSETransportPositionY,
    MSETransportGuidByte7,
    MSEPositionO,
    MSESplineElevation,
    MSEFallTime,
    MSEFallHorizontalSpeed,
    MSEFallCosAngle,
    MSEFallSinAngle,
    MSEFallVerticalSpeed,
    MSETimestamp,
    MSEPitch,
    MSEEnd,
};

static MovementStatusElements MovementSplineDoneSequence[] =
{
    MSEMovementCounter,
    MSEPositionY,
    MSEPositionX,
    MSEPositionZ,
    MSEGuidBit6,
    MSEHasOrientation,
    MSEHasFallData,
    MSEHasTimestamp,
    MSEGuidBit2,
    MSEHasSplineElevation,
    MSEGuidBit4,
    MSEHasTransportData,
    MSEGuidBit3,
    MSEHasMovementFlags,
    MSEGuidBit0,
    MSEHasUnknownBit,
    MSEGuidBit1,
    MSEGuidBit5,
    MSEHasPitch,
    MSEHasSpline,
    MSEHasMovementFlags2,
    MSEGuidBit7,
    MSETransportGuidBit1,
    MSETransportGuidBit7,
    MSETransportGuidBit5,
    MSETransportGuidBit3,
    MSETransportGuidBit4,
    MSETransportGuidBit6,
    MSEHasTransportTime2,
    MSETransportGuidBit2,
    MSEHasTransportTime3,
    MSETransportGuidBit0,
    MSEHasFallDirection,
    MSEFlags2,
    MSEFlags,
    MSEGuidByte7,
    MSEGuidByte4,
    MSEGuidByte5,
    MSEGuidByte6,
    MSEGuidByte0,
    MSEGuidByte1,
    MSEGuidByte2,
    MSEGuidByte3,
    MSEFallVerticalSpeed,
    MSEFallSinAngle,
    MSEFallCosAngle,
    MSEFallHorizontalSpeed,
    MSEFallTime,
    MSEPitch,
    MSEPositionO,
    MSETransportGuidByte1,
    MSETransportTime3,
    MSETransportGuidByte7,
    MSETransportTime,
    MSETransportPositionY,
    MSETransportPositionX,
    MSETransportPositionZ,
    MSETransportSeat,
    MSETransportPositionO,
    MSETransportGuidByte0,
    MSETransportTime2,
    MSETransportGuidByte2,
    MSETransportGuidByte3,
    MSETransportGuidByte5,
    MSETransportGuidByte6,
    MSETransportGuidByte4,
    MSETimestamp,
    MSESplineElevation,
    MSEEnd,
};

static MovementStatusElements MoveKnockbackAckSequence[] =
{
    MSEPositionY,
    MSEPositionZ,
    MSEMovementCounter,
    MSEPositionX,
    MSEGuidBit6,
    MSEHasOrientation,
    MSEHasPitch,
    MSEHasSplineElevation,
    MSEGuidBit3,
    MSEGuidBit4,
    MSEGuidBit1,
    MSEGuidBit2,
    MSEHasSpline,
    MSEGuidBit7,
    MSEHasUnknownBit,
    MSEHasMovementFlags2,
    MSEHasTimestamp,
    MSEGuidBit0,
    MSEHasMovementFlags,
    MSEHasTransportData,
    MSEGuidBit5,
    MSEHasFallData,

    MSEFlags,
    MSETransportGuidBit4,
    MSETransportGuidBit1,
    MSEHasTransportTime2,
    MSETransportGuidBit0,
    MSEHasTransportTime3,
    MSETransportGuidBit6,
    MSETransportGuidBit2,
    MSETransportGuidBit3,
    MSETransportGuidBit5,
    MSETransportGuidBit7,
    MSEFlags2,
    MSEHasFallDirection,

    MSEGuidByte4,
    MSEGuidByte5,
    MSEGuidByte1,
    MSEGuidByte6,
    MSEGuidByte0,
    MSEGuidByte3,
    MSEGuidByte2,
    MSEGuidByte7,

    MSEFallCosAngle,
    MSEFallHorizontalSpeed,
    MSEFallSinAngle,

    MSEFallTime,
    MSEFallVerticalSpeed,
    MSETimestamp,

    MSETransportPositionY,
    MSETransportGuidByte4,
    MSETransportTime2,
    MSETransportGuidByte7,
    MSETransportPositionO,
    MSETransportGuidByte6,
    MSETransportTime,
    MSETransportGuidByte3,
    MSETransportGuidByte1,
    MSETransportTime3,
    MSETransportGuidByte2,
    MSETransportPositionZ,
    MSETransportGuidByte0,
    MSETransportGuidByte5,
    MSETransportPositionX,
    MSETransportSeat,

    MSEPitch,
    MSESplineElevation,
    MSEPositionO,
    MSEEnd,
};

static MovementStatusElements MoveUpdateKnockBackSequence[] =
{
    MSEHasUnknownBit,
    MSEGuidBit4,
    MSEHasMovementFlags,
    MSEHasPitch,
    MSEHasTimestamp,
    MSEGuidBit1,
    MSEGuidBit0,
    MSEGuidBit3,
    MSEGuidBit2,
    MSEGuidBit7,
    MSEHasSpline,
    MSEHasTransportData,

    MSETransportGuidBit7,
    MSETransportGuidBit5,
    MSETransportGuidBit1,
    MSETransportGuidBit6,
    MSEHasTransportTime2,
    MSETransportGuidBit2,
    MSETransportGuidBit4,
    MSETransportGuidBit0,
    MSEHasTransportTime3,
    MSETransportGuidBit3,

    MSEGuidBit5,
    MSEHasSplineElevation,
    MSEHasMovementFlags2,
    MSEGuidBit6,

    MSEFlags,
    MSEHasFallData,
    MSEHasFallDirection,
    MSEHasOrientation,
    MSEFlags2,
    MSEPositionO,
    MSEFallCosAngle,
    MSEFallHorizontalSpeed,
    MSEFallSinAngle,
    MSEFallTime,
    MSEFallVerticalSpeed,
    MSESplineElevation,
    MSEGuidByte3,

    MSETransportGuidByte5,
    MSETransportTime3,
    MSETransportGuidByte7,
    MSETransportSeat,
    MSETransportGuidByte3,
    MSETransportGuidByte6,
    MSETransportPositionZ,
    MSETransportGuidByte1,
    MSETransportPositionY,
    MSETransportPositionX,
    MSETransportGuidByte2,
    MSETransportGuidByte0,
    MSETransportPositionO,
    MSETransportTime,
    MSETransportGuidByte4,
    MSETransportTime2,

    MSEPitch,
    MSEPositionZ,
    MSETimestamp,
    MSEPositionX,
    MSEGuidByte4,
    MSEGuidByte6,
    MSEGuidByte7,
    MSEGuidByte2,
    MSEGuidByte1,
    MSEPositionY,
    MSEGuidByte0,
    MSEGuidByte5,

    MSEEnd,
};

static MovementStatusElements MoveNotActiveMoverSequence[] =
{
    MSEPositionZ,
    MSEPositionX,
    MSEPositionY,
    MSEHasMovementFlags2,
    MSEHasTransportData,
    MSEGuidBit6,
    MSEHasSplineElevation,
    MSEGuidBit3,
    MSEHasUnknownBit,
    MSEHasTimestamp,
    MSEGuidBit0,
    MSEHasOrientation,
    MSEGuidBit5,
    MSEHasPitch,
    MSEGuidBit1,
    MSEGuidBit4,
    MSEGuidBit7,
    MSEHasSpline,
    MSEGuidBit2,
    MSEHasFallData,
    MSEHasMovementFlags,
    MSETransportGuidBit4,
    MSETransportGuidBit0,
    MSETransportGuidBit1,
    MSETransportGuidBit6,
    MSETransportGuidBit2,
    MSEHasTransportTime3,
    MSETransportGuidBit5,
    MSETransportGuidBit7,
    MSEHasTransportTime2,
    MSETransportGuidBit3,
    MSEHasFallDirection,
    MSEFlags,
    MSEFlags2,
    MSEGuidByte1,
    MSEGuidByte0,
    MSEGuidByte4,
    MSEGuidByte2,
    MSEGuidByte7,
    MSEGuidByte5,
    MSEGuidByte6,
    MSEGuidByte3,
    MSEFallVerticalSpeed,
    MSEFallCosAngle,
    MSEFallSinAngle,
    MSEFallHorizontalSpeed,
    MSEFallTime,
    MSETransportTime3,
    MSETransportGuidByte1,
    MSETransportTime2,
    MSETransportPositionO,
    MSETransportGuidByte0,
    MSETransportSeat,
    MSETransportGuidByte4,
    MSETransportGuidByte6,
    MSETransportGuidByte3,
    MSETransportGuidByte5,
    MSETransportPositionY,
    MSETransportPositionX,
    MSETransportGuidByte2,
    MSETransportPositionZ,
    MSETransportGuidByte7,
    MSETransportTime,
    MSETimestamp,
    MSESplineElevation,
    MSEPitch,
    MSEPositionO,
    MSEEnd,
};

static MovementStatusElements DismissControlledVehicleSequence[] =
{
    MSEPositionY,
    MSEPositionZ,
    MSEPositionX,
    MSEHasSplineElevation,
    MSEHasFallData,
    MSEHasTransportData,
    MSEGuidBit4,
    MSEGuidBit7,
    MSEHasMovementFlags2,
    MSEGuidBit2,
    MSEHasOrientation,
    MSEGuidBit0,
    MSEGuidBit6,
    MSEHasPitch,
    MSEHasTimestamp,
    MSEGuidBit1,
    MSEHasUnknownBit,
    MSEHasSpline,
    MSEGuidBit3,
    MSEHasMovementFlags,
    MSEGuidBit5,
    MSETransportGuidBit5,
    MSEHasTransportTime3,
    MSETransportGuidBit2,
    MSETransportGuidBit0,
    MSETransportGuidBit7,
    MSETransportGuidBit3,
    MSETransportGuidBit4,
    MSETransportGuidBit1,
    MSETransportGuidBit6,
    MSEHasTransportTime2,
    MSEFlags2,
    MSEHasFallDirection,
    MSEFlags,
    MSEGuidByte6,
    MSEGuidByte3,
    MSEGuidByte1,
    MSEGuidByte5,
    MSEGuidByte2,
    MSEGuidByte4,
    MSEGuidByte7,
    MSEGuidByte0,
    MSETimestamp,
    MSETransportTime3,
    MSETransportGuidByte4,
    MSETransportGuidByte7,
    MSETransportTime2,
    MSETransportGuidByte6,
    MSETransportTime,
    MSETransportPositionZ,
    MSETransportGuidByte0,
    MSETransportPositionX,
    MSETransportGuidByte3,
    MSETransportSeat,
    MSETransportPositionY,
    MSETransportPositionO,
    MSETransportGuidByte1,
    MSETransportGuidByte5,
    MSETransportGuidByte2,
    MSEFallTime,
    MSEFallHorizontalSpeed,
    MSEFallSinAngle,
    MSEFallCosAngle,
    MSEFallVerticalSpeed,
    MSEPositionO,
    MSESplineElevation,
    MSEPitch,
    MSEEnd,
};

static MovementStatusElements ChangeSeatsOnControlledVehicleSequence[] =
{
    MSEPositionY,
    MSEPositionX,
    MSEPositionZ,
    MSEByteParam,

    MSEHasMovementFlags,
    MSEHasTransportData,
    MSEGuidBit2,
    MSEGuidBit6,
    MSEGuidBit4,
    MSEGuid2Bit2,
    MSEGuid2Bit4,
    MSEHasOrientation,

    MSEHasUnknownBit,
    MSEGuid2Bit7,
    MSEGuidBit7,
    MSEGuid2Bit6,
    MSEHasTimestamp,
    MSEHasSplineElevation,
    MSEGuidBit5,
    MSEGuid2Bit5,

    MSEHasMovementFlags2,
    MSEHasPitch,
    MSEGuid2Bit0,
    MSEGuidBit0,
    MSEGuid2Bit1,
    MSEHasFallData,
    MSEGuidBit1,
    MSEHasSpline,

    MSEFlags,
    MSEGuid2Bit3,
    MSEGuidBit3,

    MSETransportGuidBit3,
    MSETransportGuidBit0,
    MSETransportGuidBit7,
    MSETransportGuidBit5,
    MSEHasTransportTime3,
    MSETransportGuidBit1,

    MSETransportGuidBit2,
    MSEHasTransportTime2,
    MSETransportGuidBit4,
    MSETransportGuidBit6,
    MSEFlags2,

    MSEHasFallDirection,

    MSEGuid2Byte6,
    MSEGuidByte7,
    MSEGuidByte5,
    MSEGuid2Byte1,
    MSEGuid2Byte2,
    MSEGuidByte6,
    MSEGuid2Byte5,
    MSEGuid2Byte3,
    MSEGuidByte3,
    MSEGuid2Byte0,
    MSEGuidByte0,
    MSEGuid2Byte4,
    MSEGuidByte4,
    MSEGuidByte1,
    MSEGuid2Byte7,
    MSEGuidByte2,

    MSEPitch,
    MSEFallSinAngle,
    MSEFallCosAngle,
    MSEFallHorizontalSpeed,

    MSEFallTime,
    MSEFallVerticalSpeed,

    MSETransportGuidByte2,
    MSETransportTime2,
    MSETransportTime3,
    MSETransportGuidByte0,
    MSETransportTime,
    MSETransportSeat,
    MSETransportPositionX,
    MSETransportPositionO,
    MSETransportGuidByte7,
    MSETransportGuidByte4,
    MSETransportGuidByte3,
    MSETransportGuidByte5,
    MSETransportPositionZ,
    MSETransportGuidByte1,
    MSETransportGuidByte6,
    MSETransportPositionY,

    MSESplineElevation,
    MSEPositionO,
    MSETimestamp,

    MSEEnd,
};

static MovementStatusElements MovementUpdateWalkSpeedSequence[] =
{
    MSEHasOrientation,
    MSEHasUnknownBit,
    MSEGuidBit3,
    MSEGuidBit2,
    MSETransportGuidBit6,
    MSETransportGuidBit3,
    MSETransportGuidBit2,
    MSETransportGuidBit0,
    MSETransportGuidBit4,
    MSETransportGuidBit7,
    MSETransportGuidBit1,
    MSETransportGuidBit5,
    MSEGuidBit7,
    MSEGuidBit5,
    MSEGuidBit1,
    MSEGuidBit0,
    MSEHasMovementFlags,
    MSEGuidBit6,
    MSEHasFallDirection,
    MSEFlags,
    MSEGuidBit4,
    MSEPitch,
    MSETransportGuidByte6,
    MSETransportGuidByte0,
    MSETransportGuidByte4,
    MSETransportGuidByte2,
    MSETransportPositionX,
    MSETransportGuidByte7,
    MSETransportTime,
    MSETransportPositionZ,
    MSETransportSeat,
    MSETransportGuidByte5,
    MSETransportPositionO,
    MSETransportGuidByte1,
    MSETransportPositionY,
    MSETransportGuidByte3,
    MSEFallVerticalSpeed,
    MSEFallHorizontalSpeed,
    MSEFallSinAngle,
    MSEFallCosAngle,
    MSEFallTime,
    MSEGuidByte1,
    MSEGuidByte4,
    MSEGuidByte2,
    MSEGuidByte6,
    MSEGuidByte7,
    MSETimestamp,
    MSEPositionO,
    MSEPositionY,
    MSEGuidByte0,
    MSEPositionZ,
    MSEPositionX,
    MSEGuidByte3,
    MSEGuidByte5,
    MSECustomSpeed,
    MSEEnd,
};

static MovementStatusElements MovementUpdateRunSpeedSequence[] =
{
    MSEPositionZ,
    MSEPositionX,
    MSEPositionY,
    MSECustomSpeed,
    MSEGuidBit6,
    MSEHasMovementFlags2,
    MSEHasPitch,
    MSEGuidBit2,
    MSEGuidBit5,
    MSEHasSplineElevation,
    MSEHasSpline,
    MSEHasMovementFlags,
    MSEHasTimestamp,
    MSEGuidBit1,
    MSEFlags2,
    MSEGuidBit3,
    MSEFlags,
    MSEGuidBit7,
    MSEGuidBit0,
    MSEHasOrientation,
    MSEHasTransportData,
    MSETransportGuidBit5,
    MSEHasTransportTime2,
    MSEHasTransportTime3,
    MSETransportGuidBit7,
    MSETransportGuidBit4,
    MSETransportGuidBit2,
    MSETransportGuidBit3,
    MSETransportGuidBit6,
    MSETransportGuidBit1,
    MSETransportGuidBit0,
    MSEHasFallData,
    MSEHasFallDirection,
    MSEGuidBit4,
    MSEHasUnknownBit,
    MSETransportGuidByte4,
    MSETransportGuidByte5,
    MSETransportPositionX,
    MSETransportPositionO,
    MSETransportGuidByte1,
    MSETransportGuidByte0,
    MSETransportGuidByte6,
    MSETransportTime,
    MSETransportGuidByte7,
    MSETransportSeat,
    MSETransportTime2,
    MSETransportPositionY,
    MSETransportGuidByte3,
    MSETransportGuidByte2,
    MSETransportTime3,
    MSETransportPositionZ,
    MSETimestamp,
    MSEFallCosAngle,
    MSEFallHorizontalSpeed,
    MSEFallSinAngle,
    MSEFallVerticalSpeed,
    MSEFallTime,
    MSEPitch,
    MSEGuidByte6,
    MSESplineElevation,
    MSEGuidByte5,
    MSEGuidByte7,
    MSEGuidByte4,
    MSEPositionO,
    MSEGuidByte0,
    MSEGuidByte3,
    MSEGuidByte2,
    MSEGuidByte1,
    MSEEnd,
};

static MovementStatusElements MovementUpdateRunBackSpeedSequence[] =
{
    MSEGuidBit1,
    MSEGuidBit2,
    MSEGuidBit4,
    MSEGuidBit3,
    MSEGuidBit6,
    MSEGuidBit0,
    MSEHasUnknownBit,
    MSEHasMovementFlags,
    MSEGuidBit5,
    MSEHasOrientation,
    MSEFlags,
    MSEHasFallDirection,
    MSETransportGuidBit5,
    MSETransportGuidBit3,
    MSETransportGuidBit1,
    MSETransportGuidBit6,
    MSETransportGuidBit7,
    MSETransportGuidBit2,
    MSETransportGuidBit4,
    MSETransportGuidBit0,
    MSEGuidBit7,
    MSETransportPositionX,
    MSETransportGuidByte2,
    MSETransportGuidByte5,
    MSETransportGuidByte4,
    MSETransportGuidByte6,
    MSETransportGuidByte0,
    MSETransportGuidByte3,
    MSETransportPositionY,
    MSETransportGuidByte7,
    MSETransportPositionZ,
    MSETransportTime,
    MSETransportSeat,
    MSETransportGuidByte1,
    MSETransportPositionO,
    MSEGuidByte4,
    MSEFallTime,
    MSEFallHorizontalSpeed,
    MSEFallSinAngle,
    MSEFallCosAngle,
    MSEFallVerticalSpeed,
    MSETimestamp,
    MSEGuidByte1,
    MSEPositionO,
    MSEGuidByte0,
    MSEGuidByte5,
    MSEGuidByte3,
    MSEPositionX,
    MSEPositionY,
    MSEPitch,
    MSEGuidByte7,
    MSECustomSpeed,
    MSEGuidByte2,
    MSEGuidByte6,
    MSEPositionZ,
    MSEEnd,
};

static MovementStatusElements MovementUpdateSwimSpeedSequence[] =
{
    MSEHasMovementFlags,
    MSEGuidBit2,
    MSEFlags,
    MSEGuidBit3,
    MSEHasUnknownBit,
    MSEGuidBit7,
    MSEHasFallDirection,
    MSETransportGuidBit4,
    MSETransportGuidBit5,
    MSETransportGuidBit3,
    MSETransportGuidBit2,
    MSETransportGuidBit0,
    MSETransportGuidBit1,
    MSETransportGuidBit6,
    MSETransportGuidBit7,
    MSEGuidBit6,
    MSEGuidBit0,
    MSEGuidBit4,
    MSEGuidBit5,
    MSEHasOrientation,
    MSEGuidBit1,
    MSETransportGuidByte2,
    MSETransportPositionX,
    MSETransportGuidByte6,
    MSETransportPositionO,
    MSETransportGuidByte0,
    MSETransportGuidByte4,
    MSETransportPositionY,
    MSETransportTime,
    MSETransportGuidByte1,
    MSETransportGuidByte7,
    MSETransportPositionZ,
    MSETransportSeat,
    MSETransportGuidByte3,
    MSETransportGuidByte5,
    MSEPositionX,
    MSEFallSinAngle,
    MSEFallHorizontalSpeed,
    MSEFallCosAngle,
    MSEFallTime,
    MSEFallVerticalSpeed,
    MSEGuidByte7,
    MSETimestamp,
    MSEPositionY,
    MSEPositionZ,
    MSECustomSpeed,
    MSEGuidByte4,
    MSEPositionO,
    MSEGuidByte2,
    MSEGuidByte3,
    MSEGuidByte0,
    MSEGuidByte6,
    MSEGuidByte1,
    MSEGuidByte5,
    MSEPitch,
    MSEEnd,
};

static MovementStatusElements MoveUpdateSwimBackSpeedSequence[] =
{
    MSEGuidBit7,
    MSEGuidBit2,
    MSEHasTransportData,
    MSEGuidBit1,

    MSETransportGuidBit2,
    MSETransportGuidBit1,
    MSETransportGuidBit0,
    MSETransportGuidBit7,
    MSETransportGuidBit3,
    MSETransportGuidBit4,
    MSETransportGuidBit6,
    MSEHasTransportTime2,
    MSETransportGuidBit5,
    MSEHasTransportTime3,

    MSEHasPitch,
    MSEHasOrientation,
    MSEHasUnknownBit,
    MSEGuidBit5,
    MSEGuidBit3,
    MSEGuidBit6,
    MSEGuidBit4,
    MSEHasSpline,
    MSEHasMovementFlags,
    MSEGuidBit0,
    MSEHasFallData,

    MSEHasFallDirection,

    MSEFlags,

    MSEHasTimestamp,
    MSEHasSplineElevation,
    MSEHasMovementFlags2,

    MSEFlags2,

    MSEGuidByte0,
    MSEGuidByte4,
    MSEPositionY,

    MSETransportGuidByte7,
    MSETransportTime3,
    MSETransportGuidByte6,
    MSETransportGuidByte4,
    MSETransportGuidByte2,
    MSETransportGuidByte3,
    MSETransportPositionO,
    MSETransportGuidByte5,
    MSETransportTime,
    MSETransportGuidByte0,
    MSETransportGuidByte1,
    MSETransportPositionX,
    MSETransportPositionZ,
    MSETransportTime2,
    MSETransportPositionY,
    MSETransportSeat,

    MSEFallSinAngle,
    MSEFallCosAngle,
    MSEFallHorizontalSpeed,
    MSEFallVerticalSpeed,
    MSEFallTime,

    MSEPitch,
    MSEGuidByte2,
    MSEGuidByte7,
    MSECustomSpeed,
    MSESplineElevation,
    MSEPositionZ,
    MSEGuidByte3,
    MSEPositionX,
    MSETimestamp,
    MSEGuidByte5,
    MSEPositionO,
    MSEGuidByte6,
    MSEGuidByte1,
    MSEEnd,
};

static MovementStatusElements MovementUpdateFlightSpeedSequence[] =
{
    MSEPositionY,
    MSECustomSpeed,
    MSEPositionX,
    MSEPositionZ,
    MSEHasMovementFlags,
    MSEGuidBit4,
    MSEHasUnknownBit,
    MSEGuidBit5,
    MSEGuidBit1,
    MSEFlags,
    MSEGuidBit2,
    MSEHasOrientation,
    MSEGuidBit7,
    MSETransportGuidBit3,
    MSETransportGuidBit5,
    MSETransportGuidBit1,
    MSETransportGuidBit0,
    MSETransportGuidBit6,
    MSETransportGuidBit4,
    MSETransportGuidBit2,
    MSETransportGuidBit7,
    MSEGuidBit6,
    MSEGuidBit3,
    MSEHasFallDirection,
    MSEGuidBit0,
    MSEPitch,
    MSEGuidByte0,
    MSEGuidByte5,
    MSETransportPositionO,
    MSETransportTime,
    MSETransportGuidByte5,
    MSETransportGuidByte4,
    MSETransportGuidByte6,
    MSETransportPositionZ,
    MSETransportGuidByte7,
    MSETransportGuidByte0,
    MSETransportGuidByte2,
    MSETransportGuidByte3,
    MSETransportPositionY,
    MSETransportGuidByte1,
    MSETransportSeat,
    MSETransportPositionX,
    MSEFallSinAngle,
    MSEFallHorizontalSpeed,
    MSEFallCosAngle,
    MSEFallVerticalSpeed,
    MSEFallTime,
    MSEGuidByte1,
    MSEGuidByte6,
    MSETimestamp,
    MSEGuidByte7,
    MSEGuidByte2,
    MSEGuidByte4,
    MSEPositionO,
    MSEGuidByte3,
    MSEEnd,
};

static MovementStatusElements MoveSetWalkSpeedSequence[] =
{
    MSEGuidBit0,
    MSEGuidBit4,
    MSEGuidBit5,
    MSEGuidBit2,
    MSEGuidBit3,
    MSEGuidBit1,
    MSEGuidBit6,
    MSEGuidBit7,
    MSEGuidByte6,
    MSEGuidByte1,
    MSEGuidByte5,
    MSECustomSpeed,
    MSEGuidByte2,
    MSEMovementCounter,
    MSEGuidByte4,
    MSEGuidByte0,
    MSEGuidByte7,
    MSEGuidByte3,
    MSEEnd,
};

static MovementStatusElements MoveSetRunSpeedSequence[] =
{
    MSEGuidBit6,
    MSEGuidBit1,
    MSEGuidBit5,
    MSEGuidBit2,
    MSEGuidBit7,
    MSEGuidBit0,
    MSEGuidBit3,
    MSEGuidBit4,
    MSEGuidByte5,
    MSEGuidByte3,
    MSEGuidByte1,
    MSEGuidByte4,
    MSEMovementCounter,
    MSECustomSpeed,
    MSEGuidByte6,
    MSEGuidByte0,
    MSEGuidByte7,
    MSEGuidByte2,
    MSEEnd,
};

static MovementStatusElements MoveSetRunBackSpeedSequence[] =
{
    MSEGuidBit0,
    MSEGuidBit6,
    MSEGuidBit2,
    MSEGuidBit1,
    MSEGuidBit3,
    MSEGuidBit4,
    MSEGuidBit5,
    MSEGuidBit7,
    MSEGuidByte5,
    MSEMovementCounter,
    MSECustomSpeed,
    MSEGuidByte0,
    MSEGuidByte4,
    MSEGuidByte7,
    MSEGuidByte3,
    MSEGuidByte1,
    MSEGuidByte2,
    MSEGuidByte6,
    MSEEnd,
};

static MovementStatusElements MoveSetSwimSpeedSequence[] =
{
    MSEGuidBit5,
    MSEGuidBit4,
    MSEGuidBit7,
    MSEGuidBit3,
    MSEGuidBit2,
    MSEGuidBit0,
    MSEGuidBit1,
    MSEGuidBit6,
    MSEGuidByte0,
    MSEMovementCounter,
    MSEGuidByte6,
    MSEGuidByte3,
    MSEGuidByte5,
    MSEGuidByte2,
    MSECustomSpeed,
    MSEGuidByte1,
    MSEGuidByte7,
    MSEGuidByte4,
    MSEEnd,
};

static MovementStatusElements MoveSetSwimBackSpeedSequence[] =
{
    MSEGuidBit4,
    MSEGuidBit2,
    MSEGuidBit3,
    MSEGuidBit6,
    MSEGuidBit5,
    MSEGuidBit1,
    MSEGuidBit0,
    MSEGuidBit7,
    MSEMovementCounter,
    MSEGuidByte0,
    MSEGuidByte3,
    MSEGuidByte4,
    MSEGuidByte6,
    MSEGuidByte5,
    MSEGuidByte1,
    MSECustomSpeed,
    MSEGuidByte7,
    MSEGuidByte2,
    MSEEnd,
};

static MovementStatusElements MoveSetTurnRateSequence[] =
{
    MSEGuidBit7,
    MSEGuidBit2,
    MSEGuidBit1,
    MSEGuidBit0,
    MSEGuidBit4,
    MSEGuidBit5,
    MSEGuidBit6,
    MSEGuidBit3,
    MSEGuidByte5,
    MSEGuidByte7,
    MSEGuidByte2,
    MSECustomSpeed,
    MSEGuidByte3,
    MSEGuidByte1,
    MSEGuidByte0,
    MSEMovementCounter,
    MSEGuidByte6,
    MSEGuidByte4,
    MSEEnd,
};

static MovementStatusElements MoveSetFlightSpeedSequence[] =
{
    MSEGuidBit0,
    MSEGuidBit5,
    MSEGuidBit1,
    MSEGuidBit6,
    MSEGuidBit3,
    MSEGuidBit2,
    MSEGuidBit7,
    MSEGuidBit4,
    MSEGuidByte0,
    MSEGuidByte1,
    MSEGuidByte7,
    MSEGuidByte5,
    MSECustomSpeed,
    MSEMovementCounter,
    MSEGuidByte2,
    MSEGuidByte6,
    MSEGuidByte3,
    MSEGuidByte4,
    MSEEnd,
};

static MovementStatusElements MoveSetFlightBackSpeedSequence[] =
{
    MSEGuidBit1,
    MSEGuidBit2,
    MSEGuidBit6,
    MSEGuidBit4,
    MSEGuidBit7,
    MSEGuidBit3,
    MSEGuidBit0,
    MSEGuidBit5,
    MSEGuidByte3,
    MSEMovementCounter,
    MSEGuidByte6,
    MSECustomSpeed,
    MSEGuidByte1,
    MSEGuidByte2,
    MSEGuidByte4,
    MSEGuidByte0,
    MSEGuidByte5,
    MSEGuidByte7,
    MSEEnd,
};

static MovementStatusElements MoveSetPitchRateSequence[] =
{
    MSEGuidBit1,
    MSEGuidBit2,
    MSEGuidBit6,
    MSEGuidBit7,
    MSEGuidBit0,
    MSEGuidBit3,
    MSEGuidBit5,
    MSEGuidBit4,
    MSECustomSpeed,
    MSEGuidByte6,
    MSEGuidByte4,
    MSEGuidByte0,
    MSEMovementCounter,
    MSEGuidByte1,
    MSEGuidByte2,
    MSEGuidByte7,
    MSEGuidByte3,
    MSEGuidByte5,
    MSEEnd,
};

static MovementStatusElements MovementSetCanFlySequence[] =
{
    MSEPositionZ,
    MSEPositionX,
    MSEPositionY,
    MSEHasTransportData,
    MSEGuidBit1,
    MSEGuidBit6,
    MSEGuidBit4,
    MSEGuidBit2,
    MSEHasFallData,
    MSEGuidBit0,
    MSEHasMovementFlags,
    MSEGuidBit3,
    MSEHasMovementFlags2,
    MSEGuidBit5,
    MSEHasTimestamp,
    MSEHasSplineElevation,
    MSEHasSpline,
    MSEHasOrientation,
    MSEGuidBit7,
    MSEHasUnknownBit,
    MSEHasPitch,
    MSETransportGuidBit3,
    MSEHasTransportTime2,
    MSETransportGuidBit6,
    MSETransportGuidBit0,
    MSETransportGuidBit7,
    MSETransportGuidBit4,
    MSEHasTransportTime3,
    MSETransportGuidBit1,
    MSETransportGuidBit2,
    MSETransportGuidBit5,
    MSEFlags2,
    MSEHasFallDirection,
    MSEFlags,
    MSEGuidByte2,
    MSEGuidByte0,
    MSEGuidByte4,
    MSEGuidByte7,
    MSEGuidByte5,
    MSEGuidByte1,
    MSEGuidByte3,
    MSEGuidByte6,
    MSETransportPositionZ,
    MSETransportGuidByte3,
    MSETransportGuidByte5,
    MSETransportGuidByte4,
    MSETransportSeat,
    MSETransportPositionX,
    MSETransportGuidByte2,
    MSETransportTime2,
    MSETransportPositionY,
    MSETransportGuidByte1,
    MSETransportTime,
    MSETransportGuidByte7,
    MSETransportGuidByte0,
    MSETransportPositionO,
    MSETransportGuidByte6,
    MSETransportTime3,
    MSESplineElevation,
    MSEFallSinAngle,
    MSEFallCosAngle,
    MSEFallHorizontalSpeed,
    MSEFallVerticalSpeed,
    MSEFallTime,
    MSEPitch,
    MSETimestamp,
    MSEPositionO,
    MSEEnd,
};

static MovementStatusElements MoveSetCanFlySequence[] =
{
    MSEGuidBit1,
    MSEGuidBit6,
    MSEGuidBit5,
    MSEGuidBit0,
    MSEGuidBit7,
    MSEGuidBit4,
    MSEGuidBit2,
    MSEGuidBit3,
    MSEGuidByte6,
    MSEGuidByte3,
    MSEMovementCounter,
    MSEGuidByte2,
    MSEGuidByte1,
    MSEGuidByte4,
    MSEGuidByte7,
    MSEGuidByte0,
    MSEGuidByte5,
    MSEEnd,
};

static MovementStatusElements MoveUnsetCanFlySequence[] =
{
    MSEGuidBit1,
    MSEGuidBit4,
    MSEGuidBit2,
    MSEGuidBit5,
    MSEGuidBit0,
    MSEGuidBit3,
    MSEGuidBit6,
    MSEGuidBit7,
    MSEGuidByte4,
    MSEGuidByte6,
    MSEMovementCounter,
    MSEGuidByte1,
    MSEGuidByte0,
    MSEGuidByte2,
    MSEGuidByte3,
    MSEGuidByte5,
    MSEGuidByte7,
    MSEEnd,
};

static MovementStatusElements MoveSetHoverSequence[] =
{
    MSEGuidBit1,
    MSEGuidBit4,
    MSEGuidBit2,
    MSEGuidBit3,
    MSEGuidBit0,
    MSEGuidBit5,
    MSEGuidBit6,
    MSEGuidBit7,
    MSEGuidByte5,
    MSEGuidByte4,
    MSEGuidByte1,
    MSEGuidByte2,
    MSEGuidByte3,
    MSEGuidByte6,
    MSEGuidByte0,
    MSEGuidByte7,
    MSEMovementCounter,
    MSEEnd,
};

static MovementStatusElements MoveUnsetHoverSequence[] =
{
    MSEGuidBit4,
    MSEGuidBit6,
    MSEGuidBit3,
    MSEGuidBit1,
    MSEGuidBit2,
    MSEGuidBit7,
    MSEGuidBit5,
    MSEGuidBit0,
    MSEGuidByte4,
    MSEGuidByte5,
    MSEGuidByte3,
    MSEGuidByte6,
    MSEGuidByte7,
    MSEGuidByte1,
    MSEGuidByte2,
    MSEGuidByte0,
    MSEMovementCounter,
    MSEEnd,
};

static MovementStatusElements MoveWaterWalkSequence[] =
{
    MSEGuidBit4,
    MSEGuidBit7,
    MSEGuidBit6,
    MSEGuidBit0,
    MSEGuidBit1,
    MSEGuidBit3,
    MSEGuidBit5,
    MSEGuidBit2,
    MSEGuidByte0,
    MSEGuidByte5,
    MSEGuidByte2,
    MSEMovementCounter,
    MSEGuidByte7,
    MSEGuidByte3,
    MSEGuidByte4,
    MSEGuidByte1,
    MSEGuidByte6,
    MSEEnd,
};

static MovementStatusElements MoveLandWalkSequence[] =
{
    MSEGuidBit5,
    MSEGuidBit1,
    MSEGuidBit6,
    MSEGuidBit2,
    MSEGuidBit3,
    MSEGuidBit4,
    MSEGuidBit0,
    MSEGuidBit7,
    MSEGuidByte6,
    MSEGuidByte1,
    MSEGuidByte7,
    MSEGuidByte5,
    MSEGuidByte4,
    MSEGuidByte0,
    MSEGuidByte3,
    MSEGuidByte2,
    MSEMovementCounter,
    MSEEnd,
};

static MovementStatusElements MoveFeatherFallSequence[] =
{
    MSEGuidBit3,
    MSEGuidBit1,
    MSEGuidBit7,
    MSEGuidBit0,
    MSEGuidBit4,
    MSEGuidBit2,
    MSEGuidBit5,
    MSEGuidBit6,
    MSEGuidByte5,
    MSEGuidByte7,
    MSEGuidByte2,
    MSEMovementCounter,
    MSEGuidByte0,
    MSEGuidByte3,
    MSEGuidByte4,
    MSEGuidByte1,
    MSEGuidByte6,
    MSEEnd,
};

static MovementStatusElements MoveNormalFallSequence[] =
{
    MSEMovementCounter,
    MSEGuidBit3,
    MSEGuidBit0,
    MSEGuidBit1,
    MSEGuidBit5,
    MSEGuidBit7,
    MSEGuidBit4,
    MSEGuidBit6,
    MSEGuidBit2,
    MSEGuidByte2,
    MSEGuidByte7,
    MSEGuidByte1,
    MSEGuidByte4,
    MSEGuidByte5,
    MSEGuidByte0,
    MSEGuidByte3,
    MSEGuidByte6,
    MSEEnd,
};

static MovementStatusElements MoveForceRootSequence[] =
{
    MSEGuidBit2,
    MSEGuidBit7,
    MSEGuidBit6,
    MSEGuidBit0,
    MSEGuidBit5,
    MSEGuidBit4,
    MSEGuidBit1,
    MSEGuidBit3,
    MSEGuidByte1,
    MSEGuidByte0,
    MSEGuidByte2,
    MSEGuidByte5,
    MSEMovementCounter,
    MSEGuidByte3,
    MSEGuidByte4,
    MSEGuidByte7,
    MSEGuidByte6,
    MSEEnd,
};

static MovementStatusElements MoveForceUnrootSequence[] =
{
    MSEGuidBit0,
    MSEGuidBit1,
    MSEGuidBit3,
    MSEGuidBit7,
    MSEGuidBit5,
    MSEGuidBit2,
    MSEGuidBit4,
    MSEGuidBit6,
    MSEGuidByte3,
    MSEGuidByte6,
    MSEGuidByte1,
    MSEMovementCounter,
    MSEGuidByte2,
    MSEGuidByte0,
    MSEGuidByte7,
    MSEGuidByte4,
    MSEGuidByte5,
    MSEEnd,
};

static MovementStatusElements MoveGravityDisableSequence[] =
{
    MSEGuidBit1,
    MSEGuidBit4,
    MSEGuidBit7,
    MSEGuidBit5,
    MSEGuidBit2,
    MSEGuidBit0,
    MSEGuidBit3,
    MSEGuidBit6,
    MSEGuidByte3,
    MSEMovementCounter,
    MSEGuidByte7,
    MSEGuidByte6,
    MSEGuidByte4,
    MSEGuidByte0,
    MSEGuidByte1,
    MSEGuidByte5,
    MSEGuidByte2,
    MSEEnd,
};

static MovementStatusElements MoveGravityEnableSequence[] =
{
    MSEGuidBit0,
    MSEGuidBit1,
    MSEGuidBit5,
    MSEGuidBit7,
    MSEGuidBit6,
    MSEGuidBit4,
    MSEGuidBit3,
    MSEGuidBit2,
    MSEGuidByte7,
    MSEGuidByte2,
    MSEGuidByte0,
    MSEMovementCounter,
    MSEGuidByte5,
    MSEGuidByte1,
    MSEGuidByte3,
    MSEGuidByte4,
    MSEGuidByte6,
    MSEEnd,
};

static MovementStatusElements MoveSplineWaterWalkSequence[] =
{
    MSEGuidBit6,
    MSEGuidBit1,
    MSEGuidBit4,
    MSEGuidBit2,
    MSEGuidBit3,
    MSEGuidBit7,
    MSEGuidBit5,
    MSEGuidBit0,
    MSEGuidByte0,
    MSEGuidByte6,
    MSEGuidByte3,
    MSEGuidByte7,
    MSEGuidByte4,
    MSEGuidByte2,
    MSEGuidByte5,
    MSEGuidByte1,
    MSEEnd,
};

static MovementStatusElements MoveSplineLandWalkSequence[] =
{
    MSEGuidBit5,
    MSEGuidBit0,
    MSEGuidBit4,
    MSEGuidBit6,
    MSEGuidBit7,
    MSEGuidBit2,
    MSEGuidBit3,
    MSEGuidBit1,
    MSEGuidByte5,
    MSEGuidByte7,
    MSEGuidByte3,
    MSEGuidByte4,
    MSEGuidByte1,
    MSEGuidByte2,
    MSEGuidByte0,
    MSEGuidByte6,
    MSEEnd,
};

static MovementStatusElements MoveSplineFeatherFallSequence[] =
{
    MSEGuidBit3,
    MSEGuidBit2,
    MSEGuidBit7,
    MSEGuidBit5,
    MSEGuidBit4,
    MSEGuidBit6,
    MSEGuidBit1,
    MSEGuidBit0,
    MSEGuidByte1,
    MSEGuidByte4,
    MSEGuidByte7,
    MSEGuidByte6,
    MSEGuidByte2,
    MSEGuidByte0,
    MSEGuidByte5,
    MSEGuidByte3,
    MSEEnd,
};

static MovementStatusElements MoveSplineNormalFallSequence[] =
{
    MSEGuidBit3,
    MSEGuidBit5,
    MSEGuidBit1,
    MSEGuidBit0,
    MSEGuidBit7,
    MSEGuidBit6,
    MSEGuidBit2,
    MSEGuidBit4,
    MSEGuidByte7,
    MSEGuidByte6,
    MSEGuidByte2,
    MSEGuidByte0,
    MSEGuidByte5,
    MSEGuidByte4,
    MSEGuidByte3,
    MSEGuidByte1,
    MSEEnd,
};

static MovementStatusElements MoveSplineSetHoverSequence[] =
{
    MSEGuidBit3,
    MSEGuidBit7,
    MSEGuidBit0,
    MSEGuidBit1,
    MSEGuidBit4,
    MSEGuidBit6,
    MSEGuidBit2,
    MSEGuidBit5,
    MSEGuidByte2,
    MSEGuidByte4,
    MSEGuidByte3,
    MSEGuidByte1,
    MSEGuidByte7,
    MSEGuidByte0,
    MSEGuidByte5,
    MSEGuidByte6,
    MSEEnd,
};

static MovementStatusElements MoveSplineUnsetHoverSequence[] =
{
    MSEGuidBit6,
    MSEGuidBit7,
    MSEGuidBit4,
    MSEGuidBit0,
    MSEGuidBit3,
    MSEGuidBit1,
    MSEGuidBit5,
    MSEGuidBit2,
    MSEGuidByte4,
    MSEGuidByte5,
    MSEGuidByte3,
    MSEGuidByte0,
    MSEGuidByte2,
    MSEGuidByte7,
    MSEGuidByte6,
    MSEGuidByte1,
    MSEEnd,
};

static MovementStatusElements MoveSplineSetFlyingSequence[] =
{
    MSEGuidBit0,
    MSEGuidBit4,
    MSEGuidBit1,
    MSEGuidBit6,
    MSEGuidBit7,
    MSEGuidBit2,
    MSEGuidBit3,
    MSEGuidBit5,
    MSEGuidByte7,
    MSEGuidByte0,
    MSEGuidByte5,
    MSEGuidByte6,
    MSEGuidByte4,
    MSEGuidByte1,
    MSEGuidByte3,
    MSEGuidByte2,
    MSEEnd,
};

static MovementStatusElements MoveSplineUnsetFlyingSequence[] =
{
    MSEGuidBit5,
    MSEGuidBit0,
    MSEGuidBit4,
    MSEGuidBit7,
    MSEGuidBit2,
    MSEGuidBit3,
    MSEGuidBit1,
    MSEGuidBit6,
    MSEGuidByte7,
    MSEGuidByte2,
    MSEGuidByte3,
    MSEGuidByte4,
    MSEGuidByte5,
    MSEGuidByte1,
    MSEGuidByte6,
    MSEGuidByte0,
    MSEEnd,
};

static MovementStatusElements MoveSplineRootSequence[] =
{
    MSEGuidBit5,
    MSEGuidBit4,
    MSEGuidBit6,
    MSEGuidBit1,
    MSEGuidBit3,
    MSEGuidBit7,
    MSEGuidBit2,
    MSEGuidBit0,
    MSEGuidByte2,
    MSEGuidByte1,
    MSEGuidByte7,
    MSEGuidByte3,
    MSEGuidByte5,
    MSEGuidByte0,
    MSEGuidByte6,
    MSEGuidByte4,
    MSEEnd,
};

static MovementStatusElements MoveSplineUnrootSequence[] =
{
    MSEGuidBit0,
    MSEGuidBit1,
    MSEGuidBit6,
    MSEGuidBit5,
    MSEGuidBit3,
    MSEGuidBit2,
    MSEGuidBit7,
    MSEGuidBit4,
    MSEGuidByte6,
    MSEGuidByte3,
    MSEGuidByte1,
    MSEGuidByte5,
    MSEGuidByte2,
    MSEGuidByte0,
    MSEGuidByte7,
    MSEGuidByte4,
    MSEEnd,
};

static MovementStatusElements MoveSplineStartSwimSequence[] =
{
    MSEGuidBit1,
    MSEGuidBit6,
    MSEGuidBit0,
    MSEGuidBit7,
    MSEGuidBit3,
    MSEGuidBit5,
    MSEGuidBit2,
    MSEGuidBit4,
    MSEGuidByte3,
    MSEGuidByte7,
    MSEGuidByte2,
    MSEGuidByte5,
    MSEGuidByte6,
    MSEGuidByte4,
    MSEGuidByte1,
    MSEGuidByte0,
    MSEEnd,
};

static MovementStatusElements MoveSplineStopSwimSequence[] =
{
    MSEGuidBit4,
    MSEGuidBit1,
    MSEGuidBit5,
    MSEGuidBit3,
    MSEGuidBit0,
    MSEGuidBit7,
    MSEGuidBit2,
    MSEGuidBit6,
    MSEGuidByte6,
    MSEGuidByte0,
    MSEGuidByte7,
    MSEGuidByte2,
    MSEGuidByte3,
    MSEGuidByte1,
    MSEGuidByte5,
    MSEGuidByte4,
    MSEEnd,
};

static MovementStatusElements MoveSplineDisableGravitySequence[] =
{
    MSEGuidBit7,
    MSEGuidBit3,
    MSEGuidBit4,
    MSEGuidBit2,
    MSEGuidBit5,
    MSEGuidBit1,
    MSEGuidBit0,
    MSEGuidBit6,
    MSEGuidByte7,
    MSEGuidByte1,
    MSEGuidByte3,
    MSEGuidByte4,
    MSEGuidByte6,
    MSEGuidByte2,
    MSEGuidByte5,
    MSEGuidByte0,
    MSEEnd,
};

static MovementStatusElements MoveSplineEnableGravitySequence[] =
{
    MSEGuidBit5,
    MSEGuidBit4,
    MSEGuidBit7,
    MSEGuidBit1,
    MSEGuidBit3,
    MSEGuidBit6,
    MSEGuidBit2,
    MSEGuidBit0,
    MSEGuidByte7,
    MSEGuidByte3,
    MSEGuidByte4,
    MSEGuidByte2,
    MSEGuidByte1,
    MSEGuidByte6,
    MSEGuidByte0,
    MSEGuidByte5,
    MSEEnd,
};

static MovementStatusElements MoveSplineSetWalkModeSequence[] =
{
    MSEGuidBit7,
    MSEGuidBit6,
    MSEGuidBit5,
    MSEGuidBit1,
    MSEGuidBit3,
    MSEGuidBit4,
    MSEGuidBit2,
    MSEGuidBit0,
    MSEGuidByte4,
    MSEGuidByte2,
    MSEGuidByte1,
    MSEGuidByte6,
    MSEGuidByte5,
    MSEGuidByte0,
    MSEGuidByte7,
    MSEGuidByte3,
    MSEEnd,
};

static MovementStatusElements MoveSplineSetRunModeSequence[] =
{
    MSEGuidBit5,
    MSEGuidBit6,
    MSEGuidBit3,
    MSEGuidBit7,
    MSEGuidBit2,
    MSEGuidBit0,
    MSEGuidBit4,
    MSEGuidBit1,
    MSEGuidByte7,
    MSEGuidByte0,
    MSEGuidByte4,
    MSEGuidByte6,
    MSEGuidByte5,
    MSEGuidByte1,
    MSEGuidByte2,
    MSEGuidByte3,
    MSEEnd,
};

static MovementStatusElements MoveUpdateTeleport[] =
{
    MSEPositionZ,
    MSEPositionY,
    MSEPositionX,
    MSEHasOrientation,

    MSEHasSpline,
    MSEHasMovementFlags,
    MSEGuidBit2,
    MSEGuidBit4,
    MSEGuidBit6,
    MSEHasFallData,
    MSEGuidBit0,
    MSEHasTransportData,
    MSEGuidBit5,

    MSETransportGuidBit1,
    MSETransportGuidBit4,
    MSETransportGuidBit5,
    MSETransportGuidBit3,
    MSETransportGuidBit0,
    MSEHasTransportTime2,
    MSETransportGuidBit7,
    MSETransportGuidBit6,
    MSEHasTransportTime3,
    MSETransportGuidBit2,

    MSEHasUnknownBit,

    MSEGuidBit7,
    MSEGuidBit3,
    MSEHasPitch,
    MSEHasMovementFlags2,
    MSEHasTimestamp,

    MSEHasFallDirection,
    MSEFlags2,
    MSEHasSplineElevation,
    MSEFlags,
    MSEGuidBit1,

    MSEGuidByte7,
    MSETransportGuidByte3,
    MSETransportGuidByte4,
    MSETransportPositionO,
    MSETransportTime3,
    MSETransportGuidByte1,
    MSETransportTime2,
    MSETransportPositionZ,
    MSETransportGuidByte7,
    MSETransportGuidByte0,
    MSETransportGuidByte6,
    MSETransportGuidByte5,
    MSETransportGuidByte2,
    MSETransportSeat,
    MSETransportTime,
    MSETransportPositionY,
    MSETransportPositionX,

    MSEGuidByte6,
    MSEPitch,
    MSESplineElevation,
    MSEPositionO,
    MSEGuidByte2,
    MSEGuidByte3,
    MSEGuidByte1,

    MSEFallTime,
    MSEFallHorizontalSpeed,
    MSEFallCosAngle,
    MSEFallSinAngle,
    MSEFallVerticalSpeed,

    MSEGuidByte5,
    MSEGuidByte4,
    MSETimestamp,
    MSEGuidByte0,

    MSEEnd,
};

static inline MovementStatusElements* GetMovementStatusElementsSequence(uint16_t opcode)
{
    switch (opcode)
    {
        case CMSG_CAST_SPELL:
        case CMSG_PET_CAST_SPELL:
        case CMSG_USE_ITEM:
            return MovementCastSpellSequence;
        case CMSG_MOVE_CHNG_TRANSPORT:
            return MovementChngTransportSequence;
        case MSG_MOVE_FALL_LAND:
            return MovementFallLandSequence;
        case CMSG_MOVE_FALL_RESET:
            return MovementFallResetSequence;
        case MSG_MOVE_JUMP:
            return MovementJumpSequence;
        case CMSG_MOVE_SET_CAN_FLY_ACK:
            return MovementSetCanFlyAckSequence;
        case MSG_MOVE_SET_FACING:
            return MovementSetFacingSequence;
        case MSG_MOVE_SET_PITCH:
            return MovementSetPitchSequence;
        case MSG_MOVE_SET_RUN_MODE:
            return MovementSetRunModeSequence;
        case MSG_MOVE_SET_WALK_MODE:
            return MovementSetWalkModeSequence;
        case CMSG_MOVE_SPLINE_DONE:
            return MovementSplineDoneSequence;
        case MSG_MOVE_START_BACKWARD:
            return MovementStartBackwardSequence;
        case MSG_MOVE_START_FORWARD:
            return MovementStartForwardSequence;
        case MSG_MOVE_START_STRAFE_LEFT:
            return MovementStartStrafeLeftSequence;
        case MSG_MOVE_START_STRAFE_RIGHT:
            return MovementStartStrafeRightSequence;
        case MSG_MOVE_START_TURN_LEFT:
            return MovementStartTurnLeftSequence;
        case MSG_MOVE_START_TURN_RIGHT:
            return MovementStartTurnRightSequence;
        case MSG_MOVE_STOP:
            return MovementStopSequence;
        case MSG_MOVE_STOP_STRAFE:
            return MovementStopStrafeSequence;
        case MSG_MOVE_STOP_TURN:
            return MovementStopTurnSequence;
        case MSG_MOVE_START_ASCEND:
            return MovementStartAscendSequence;
        case MSG_MOVE_START_DESCEND:
            return MovementStartDescendSequence;
        case MSG_MOVE_START_SWIM:
            return MovementStartSwimSequence;
        case MSG_MOVE_STOP_SWIM:
            return MovementStopSwimSequence;
        case MSG_MOVE_STOP_ASCEND:
            return MovementStopAscendSequence;
        case MSG_MOVE_START_PITCH_DOWN:
            return MovementStartPitchDownSequence;
        case MSG_MOVE_START_PITCH_UP:
            return MovementStartPitchUpSequence;
        case MSG_MOVE_STOP_PITCH:
            return MovementStopPitchSequence;
        case MSG_MOVE_HEARTBEAT:
            return MovementHeartBeatSequence;
        case SMSG_PLAYER_MOVE:
            return PlayerMoveSequence;
        case CMSG_MOVE_KNOCK_BACK_ACK:
            return MoveKnockbackAckSequence;
        case SMSG_MOVE_UPDATE_KNOCK_BACK:
            return MoveUpdateKnockBackSequence;
        case CMSG_MOVE_NOT_ACTIVE_MOVER:
            return MoveNotActiveMoverSequence;
        case CMSG_DISMISS_CONTROLLED_VEHICLE:
            return DismissControlledVehicleSequence;
        case CMSG_CHANGE_SEATS_ON_CONTROLLED_VEHICLE:
            return ChangeSeatsOnControlledVehicleSequence;
        case SMSG_FORCE_WALK_SPEED_CHANGE:
            return MovementUpdateWalkSpeedSequence;
        case SMSG_FORCE_RUN_SPEED_CHANGE:
            return MovementUpdateRunSpeedSequence;
        case SMSG_FORCE_RUN_BACK_SPEED_CHANGE:
            return MovementUpdateRunBackSpeedSequence;
        case SMSG_FORCE_SWIM_SPEED_CHANGE:
            return MovementUpdateSwimSpeedSequence;
        case SMSG_FORCE_SWIM_BACK_SPEED_CHANGE:
            return MoveUpdateSwimBackSpeedSequence;
        //case SMSG_FORCE_TURN_RATE_CHANGE:
        case SMSG_FORCE_FLIGHT_SPEED_CHANGE:
            return MovementUpdateFlightSpeedSequence;
        //case SMSG_FORCE_FLIGHT_BACK_SPEED_CHANGE:
        //case SMSG_FORCE_PITCH_RATE_CHANGE:
        case MSG_MOVE_SET_WALK_SPEED:
            return MoveSetWalkSpeedSequence;
        case MSG_MOVE_SET_RUN_SPEED:
            return MoveSetRunSpeedSequence;
        case MSG_MOVE_SET_RUN_BACK_SPEED:
            return MoveSetRunBackSpeedSequence;
        case MSG_MOVE_SET_SWIM_SPEED:
            return MoveSetSwimSpeedSequence;
        case MSG_MOVE_SET_SWIM_BACK_SPEED:
            return MoveSetSwimBackSpeedSequence;
        case MSG_MOVE_SET_TURN_RATE:
            return MoveSetTurnRateSequence;
        case MSG_MOVE_SET_FLIGHT_SPEED:
            return MoveSetFlightSpeedSequence;
        case MSG_MOVE_SET_FLIGHT_BACK_SPEED:
            return MoveSetFlightBackSpeedSequence;
        case MSG_MOVE_SET_PITCH_RATE:
            return MoveSetPitchRateSequence;
        case CMSG_MOVE_SET_CAN_FLY:
            return MovementSetCanFlySequence;
        case SMSG_MOVE_SET_CAN_FLY:
            return MoveSetCanFlySequence;
        case SMSG_MOVE_UNSET_CAN_FLY:
            return MoveUnsetCanFlySequence;
        case SMSG_MOVE_SET_HOVER:
            return MoveSetHoverSequence;
        case SMSG_MOVE_UNSET_HOVER:
            return MoveUnsetHoverSequence;
        case SMSG_MOVE_WATER_WALK:
            return MoveWaterWalkSequence;
        case SMSG_MOVE_LAND_WALK:
            return MoveLandWalkSequence;
        case SMSG_MOVE_FEATHER_FALL:
            return MoveFeatherFallSequence;
        case SMSG_MOVE_NORMAL_FALL:
            return MoveNormalFallSequence;
        case SMSG_FORCE_MOVE_ROOT:
            return MoveForceRootSequence;
        case SMSG_FORCE_MOVE_UNROOT:
            return MoveForceUnrootSequence;
        case SMSG_MOVE_GRAVITY_DISABLE:
            return MoveGravityDisableSequence;
        case SMSG_MOVE_GRAVITY_ENABLE:
            return MoveGravityEnableSequence;
        case SMSG_SPLINE_MOVE_WATER_WALK:
            return MoveSplineWaterWalkSequence;
        case SMSG_SPLINE_MOVE_LAND_WALK:
            return MoveSplineLandWalkSequence;
        case SMSG_SPLINE_MOVE_FEATHER_FALL:
            return MoveSplineFeatherFallSequence;
        case SMSG_SPLINE_MOVE_NORMAL_FALL:
            return MoveSplineNormalFallSequence;
        case SMSG_SPLINE_MOVE_SET_HOVER:
            return MoveSplineSetHoverSequence;
        case SMSG_SPLINE_MOVE_UNSET_HOVER:
            return MoveSplineUnsetHoverSequence;
        case SMSG_SPLINE_MOVE_SET_FLYING:
            return MoveSplineSetFlyingSequence;
        case SMSG_SPLINE_MOVE_UNSET_FLYING:
            return MoveSplineUnsetFlyingSequence;
        case SMSG_SPLINE_MOVE_ROOT:
            return MoveSplineRootSequence;
        case SMSG_SPLINE_MOVE_UNROOT:
            return MoveSplineUnrootSequence;
        case SMSG_SPLINE_MOVE_START_SWIM:
            return MoveSplineStartSwimSequence;
        case SMSG_SPLINE_MOVE_STOP_SWIM:
            return MoveSplineStopSwimSequence;
        case SMSG_SPLINE_MOVE_GRAVITY_DISABLE:
            return MoveSplineDisableGravitySequence;
        case SMSG_SPLINE_MOVE_GRAVITY_ENABLE:
            return MoveSplineEnableGravitySequence;
        case SMSG_SPLINE_MOVE_SET_WALK_MODE:
            return MoveSplineSetWalkModeSequence;
        case SMSG_SPLINE_MOVE_SET_RUN_MODE:
            return MoveSplineSetRunModeSequence;
        case SMSG_MOVE_UPDATE_TELEPORT:
            return MoveUpdateTeleport;
        default:
            return nullptr;
    }
}

class ExtraMovementStatusElement
{
public:
    ExtraMovementStatusElement(MovementStatusElements const* elements) : _elements(elements), _index(0) { }

    void readNextElement(ByteBuffer& packet);
    void writeNextElement(ByteBuffer& packet);

    struct
    {
        ObjectGuid guid;
        float floatData;
        int8_t byteData;
    } Data;

protected:
    void resetIndex() { _index = 0; }

private:
    MovementStatusElements const* _elements;
    uint32_t _index;
};
#endif
